Css 将Pinterest插件的pinit按钮放置在图像顶部
我正在尝试在我的博客中使用Pinterest插件,它应该在我的帖子中的任何图片顶部显示一个PinIt按钮。我像往常一样安装了所有的东西,但它并没有像往常一样安装在我的图片上方的按钮,而是单独安装,图片向下移动。我正在使用样式Css 将Pinterest插件的pinit按钮放置在图像顶部,css,wordpress,plugins,position,pinterest,Css,Wordpress,Plugins,Position,Pinterest,我正在尝试在我的博客中使用Pinterest插件,它应该在我的帖子中的任何图片顶部显示一个PinIt按钮。我像往常一样安装了所有的东西,但它并没有像往常一样安装在我的图片上方的按钮,而是单独安装,图片向下移动。我正在使用样式位置:relative但它没有按我想要的方式工作。 您可以在我的博客中看到它:更改: .sn_pin { background: url("http://www.thehibou.com/wp-content/uploads/2012/10/pinit-button.
位置:relative代码>但它没有按我想要的方式工作。
您可以在我的博客中看到它:更改:
.sn_pin {
background: url("http://www.thehibou.com/wp-content/uploads/2012/10/pinit-button.png") repeat scroll 0 0 transparent;
bottom: 0;
display: block;
float: right;
height: 117px;
margin: -147px 0 0;
opacity: 1 !important;
position: relative;
right: 0;
width: 113px;
z-index: 999;
}
.sn_pinterest .sn_pin {
display: none;
position: relative;
}
.sn_pinterest:hover .sn_pin {
display: block;
position: relative;
}
.sn_pinterest:hover {
opacity: 0.75 !important;
position: relative;
}
致:
只需回顾一下:删除所有位置:relative但将最上面的一个替换为绝对值。同时移除底部:0和浮动:右强>
希望这有帮助;) 要使其位于右下角,请添加另一个CSS规则:
.sn_pinterest {
position: relative;
overflow: hidden;
}
然后添加底部:0pxto.sn\U引脚
希望这有帮助;) 非常感谢!!!成功了!现在唯一的问题是它位于右上角,而我想要它位于右下角?我在哪里可以改变?你有机会尝试我的第二个答案吗?应该已将pinterest按钮放置在图像右下角;)
.sn_pinterest {
position: relative;
overflow: hidden;
}