2
我的問題是這樣的.figure
場是100%,但.recomddo
沒有去的.figure
角落的圖像上沒有位置,我想要的是.recomddo
上的位置IMGDIV浮動圖像位置
怎麼能做到這一點使用jQuery或CSS的效果,我們感激的幫助
figure.envoltura {
position: relative;
display: block;
margin-bottom: 40px;
}
figure {
margin: 0;
}
.page_img {
border: 2px solid #ddd;
background-color: #fff;
\t max-width: 100%;
}
.recomddo, .recomddo:before {
width: 40px;
height: 40px;
line-height: 40px;
text-align: center;
color: #fff;
}
.recomddo {
position: absolute;
background-color: #F1C40F;
top: 10px;
right: -10px;
border-radius: 5px 5px 0 5px;
font-weight: bold;
}
.recomddo:after {
width: 0;
height: 0;
border-top: 10px solid #C19D0C;
border-right: 10px solid transparent;
content: '';
position: absolute;
bottom: -10px;
right: 0;
}
<figure id="fig_solo" class="envoltura">
<img class="page_img" src="http://placehold.it/350x150">
\t <span class="recomddo">1</span>
</figure>
您已將figure.envoltura設置爲顯示:block - 填充整個寬度。它需要100%嗎? – Popnoodles
標記可以更改嗎? – Popnoodles
我的興趣是'.recomddo'這個圖像 –