我在锚标签中有一个img标签。 ancher标签位于div标签内。我正在使用img标签的alt属性。 alt属性的值是一个长度为68个字符的文本。我的问题是alt属性值(文本)正在div &之外,它隐藏在IE中。我的意思是在显示几个字符后,通常休息字符被隐藏或裁剪。这是我的html代码片段。如何为img标签的alt属性(word-break:break-all属性在IE中不起作用)编写css
<div class="products">
<div class="prod-image" id="catEntryImage">
<div class="prodClass" id=WCCE>
<a><img alt="some text total around 70 character" src="someURL"/></a>
<P class=gasCode></P>
</div>
</div>
<div class="prod-content"></div>
<script type="text/javaScript"></script>
</div>
CSS对于给定的HTML片段
div {
line-height: 1.4em;
word-break: break-all;
position: relative;
margin: 0;
padding: 0;
border: 0;
font-family: arial, helvetica, sans-serif;
font-size: 100%;
}
img {
text-decoration: none;
border:0;
}
a {
color: #e10014;
text-decoration: none;
font-size: 1.2em;
}
.products .prod-image {
width: 135px;
float: left;
margin-right: 20px;
margin-bottom: 20px;
text-align: center;
vertical-align: bottom;
overflow: hidden;
max-height: 250px;
overflow: hidden;
}
.products .prod-content {
width: 288px;
float: left;
margin-bottom: 20px;
text-align: left;
vertical-align: bottom;
}
我申请自动换行&断行CSS属性图像的alt属性,但它也没有工作。任何机构能帮助我吗?这只发生在IE中。如果我为img标签使用“word-break:break-all”CSS属性,而不是在Chrome中正常工作,但在IE中不起作用。
可以请你提供HTML代码..让我们可以更找出你的问题。 – pedram
我已经提供了上面的html&css代码片段。 –
其中'IE'作为它在IE11和IE10上正常工作的地方。 – vivekkupadhyay