我为Blogger找到了相关的post
内容。除图像缩小外,它工作正常。如果图像在代码中具有与w& h不同的比率,则会以奇怪的方式调整大小。我尝试了其他方法,但没有一种方法有效。
以下是代码:
<b:if cond='data:blog.pageType == "item"'>
<style type='text/css'>
#related-posts{float:left;width:100%; margin-bottom:40px;border-top: 8px ridge #eaeaea;border-bottom: 4px ridge #eaeaea;}
#related-posts a{border-right: 1px dotted #eaeaea;}
#related-posts a:hover{background: #EEEEEE;}
#related-posts h2{margin-top: 40px;margin-bottom: 20px;background:none;font:18px Play;padding:3px;color:#999999; text-transform:uppercase;}
#related-title {color:#666;text-align: center !important;padding: 0px 60px 10px;font-size:12px;width:110px; height: 40px;}
#related-posts .related_img {margin:5px;border:2px solid #f2f2f2;width:220px;height:auto;transition:all 300ms ease-in-out;-webkit-transition:all 300ms ease-in-out;-moz-transition:all 300ms ease-in-out;-o-transition:all 300ms ease-in-out;-ms-transition:all 300ms ease-in-out;-webkit-border-radius: 5px; -moz-border-radius: 20px; border-radius: 5px; opacity:0.7; filter:alpha(opacity=70);border-radius:24px;}
#related-posts .related_img:hover{border:2px solid #E8E8E8;opacity:1.0;filter:alpha(opacity=100);-moz-opacity:1.0;-khtml-opacity:1.0}</style>