一种较酷的给图片加上说明文字的方法
Tuesday, 25. July 2006, 08:34:00
If The New York Times has captions on their images, why shouldn't everyone be able to have them? With the help of Image Caption, adding text to accompany regular old <img> tags couldn't be easier. Give your image a "title" -- how appropriate! -- and a class, and in less than a minute you'll have beautiful looking captions for your images.
只需要很少的JS和CSS 代码.
JS文件
CSS
使用时只需在IMG的TITLE标签里加入说明文字,再加上class="imgcaption"就可.
eg:
这样一来,说明文字会显示在图片的下方.
效果演示
原文
只需要很少的JS和CSS 代码.
JS文件
CSS
.arc90_imgcaptionTXT {
color: #666;
text-align: center;
}
.arc90_imgcaption {
border: 1px solid #DDD;
padding: .5em .5em .5em;
margin: 0;
}
.floatl { float: left; margin-right: 1em; }
.floatr { float: right; margin-left: 1em; }
使用时只需在IMG的TITLE标签里加入说明文字,再加上class="imgcaption"就可.
eg:
<img class="imgcaption" src="st.jpg" width="320" height="240" alt="珍贵的观叶植物--苏铁<br />苏铁又称铁树、风尾蕉,苏铁科常绿木本树种 " title="珍贵的观叶植物--苏铁<br />苏铁又称铁树、风尾蕉,苏铁科常绿木本树种 " />
这样一来,说明文字会显示在图片的下方.
效果演示
原文







