img [align = right]应该工作吗? [英] Should img[align=right] work?
本文介绍了img [align = right]应该工作吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有成千上万种带有嵌入式图像的文章,如下所示:
I have thousands of articles with inline images like this:
<img src='...' align='left'/>
和
<img src='...' align='right'/>
我想按如下方式使用CSS添加填充,但这不起作用:
I would like to add padding using CSS as follows, but it doesn't work:
img[align=left] {padding-right:10px}
img[align=right] {padding-left:10px}
这似乎不受支持?
推荐答案
这在Win7/Chrome/8和Win7/FF/3.6上对我有用(不管是否引用该值):
This works for me (with or without quoting the value) on Win7/Chrome/8 and Win7/FF/3.6: http://jsfiddle.net/gLe3U/
您需要提供有关OS/浏览器/版本的更多详细信息,这可能会给您带来麻烦,并可能提供完整的测试用例(例如,通过 http://jsfiddle.net )
You'll need to provide more details on the OS/browser/version giving you trouble, and perhaps provide a full test case (e.g. through http://jsfiddle.net)
这篇关于img [align = right]应该工作吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文