wordpress中文章内图片自动添加外边框

作者:matrix 被围观: 2,403 次 发布时间:2013-08-29 分类:Wordpress 兼容并蓄 | 无评论 »

这是一个创建于 3885 天前的主题,其中的信息可能已经有所发展或是发生改变。

给文章中的图片自动添加外边框会带来不一样的效果,需要在主题style.css中添加代码。

样式一:

代码:

.entry img { max-width: 650px; width: auto; max-height: 400px; height: auto; padding: 5px; background: #fff; box-shadow:0 0 30px rgba(0, 0, 0, 0.5); -webkit-box-shadow:0 0 30px rgba(0, 0, 0, 0.5); -moz-box-shadow:0 0 30px rgba(0, 0, 0, 0.5); }
.entry img:hover { background: #DD856D; }

样式二:

代码:

.entry img{
    max-width:548px!important;
    _width:expression(this.scrollwidth > 548 ? "548px" : (this.scrollwidth < 1? "1px" : "auto"));
    height:auto;border:0;display:inline;position: relative;
    background:url('images/125.png') no-repeat left bottom;padding-bottom:15px;}

其中images/125.png可自定义。如果图片宽度太小,边框显示会不理想。代码来自别人家的孩子,SO 问题只有搁在这里。

下载:

http://www.400gb.com/file/28831572

http://pan.baidu.com/share/link?shareid=4275666077&uk=3238236832

其他文章:
本文固定链接:https://www.hhtjim.com/automatically-add-framing-within-wordpress-post-pictures.html
matrix
本文章由 matrix 于2013年08月29日发布在Wordpress, 兼容并蓄分类下,目前没有通告,你可以至底部留下评论。
转载请注明:wordpress中文章内图片自动添加外边框-HHTjim'S 部落格
关键字:,

添加新评论 »

 🙈 😱 😂 😛 😭 😳 😀 😆 👿 😉 😯 😮 😕 😎 😐 😥 😡 😈 💡

插入图片

NOTICE: You should type some Chinese word (like “你好”) in your comment to pass the spam-check, thanks for your patience!