相关疑难解决方法(0)

如何设置<alt>标签的字符串?

有没有办法为alt设计风格?用javascript?有伪属性?像这样:

<img src="foo.jpg" alt="<h1>This is the caption</h1><p>This is some text</p><p>Another text</p>" />
Run Code Online (Sandbox Code Playgroud)

??

和javascript(我使用JQuery框架)做这样的事情?

Get value of <alt> from <img>
make value between <h1></h1> css font-size:22px; color:green;
make value between <p></p> css font-size:14px; color:black;
Run Code Online (Sandbox Code Playgroud)

BTW:javascript读取图像的alt-tag并在屏幕上显示..所以这个alt文本不仅会显示如果img没有加载.

html javascript css jquery image

3
推荐指数
1
解决办法
3385
查看次数

标签 统计

css ×1

html ×1

image ×1

javascript ×1

jquery ×1