我試圖做一個頁面與此類似: 製作一個div「重疊」 div容器
我試圖使資料圖片格去「下面的」壁紙股利。這裏是我的relavent代碼:
CSS代碼:
.profile-picture {
display: inline-block;
margin-left: 10px;
width: 150px;
height: 150px;
-ms-border-radius: 50%;
border-radius: 50%;
background-repeat: no-repeat;
background-position: center center;
-ms-background-size: cover;
background-size: cover;
background-image: url("../Images/profiles/default.png")
}
.wallpaper {
width: 100%;
-ms-background-size: cover;
background-size: cover;
background-image: url("../images/Wallpapers/default.png")
}
HTML代碼:
<div class="col-md-6 roundedCorners" style="background-color: white">
<div class="wallpaper">
<div class="row">
<div class="col-md-6" style="text-align: left">
<div class="profile-picture">
</div>
</div>
<div class="col-md-6">
</div>
</div>
</div>
</div>
現在,一切工作除了它把圓形的輪廓圖片垂直居中內圖片。我希望它漂浮在牆紙之外,如上圖所示。我錯過了什麼?
我不得不做一些小的調整。但它的作品!謝謝,更重要的是謝謝你的解釋。 – Icemanind