Code effect
http://u6.gg/Xbj
I want to put the avatar into the frame and make it adaptive.
Here comes a master to help me change the code.
PHP中文网2017-05-18 11:03:03
.bg adds relative positioning;
Put a p outside the avatar and use absolute positioning, set the size you want; Use percentages for all key units
Avatar setting width, height100%
我想大声告诉你2017-05-18 11:03:03
Add class: <img class="img-box" src="./0.jpg" class="avatar">
class style:
.img-box {
position: absolute;
left: 150px;
top: 25px;
width: 122px;
height: 124px;
}
.bg {
position: absolute;
}
You should find the cut image People want specific sizes, I made them by manual debugging
PHP中文网2017-05-18 11:03:03
.bg {
position: relative;
}
.avatar {
position: absolute;
top: 9%;
left: 14.5%;
width: 12%;
}
.top-bg {
width: 100%;
position: relative;
z-index: 2;
}
Change the window size as you wish