【问题标题】:asp net imagebutton alternate text multilineasp net imagebutton 替代文本多行
【发布时间】:2012-05-04 13:29:10
【问题描述】:

我想知道是否可以将交替文本设为多行,而不是单行? 谢谢,奥克。

【问题讨论】:

  • 你能举个例子吗,不知道你的意思
  • 默认情况下,文字位于图像的左上角,如果它比图像的宽度长,其余的文字就会消失。我想知道是否可以将文本分成多行。

标签: text asp-classic imagebutton .net alternate


【解决方案1】:

另一种可能性

<img id="img1" width=50 src="foo.jpg" alt="come here" 
  onmouseover="this.style.display='block';this.alt='looo oooooooo oooooooooo oooooooooo oooooong'"
  onmouseout="this.style.display='inline';this.alt='come here'"
/>

【讨论】:

    【解决方案2】:

    好吧,在某些浏览器上,您可以像这样控制属性,但它也会影响图像本身的样式。

    <style>
    img[alt] { border: 1px solid #000;display: block;  }
    </style>
    

    在我的 FF 上,这会显示所有包装的文本

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多