hier ist eine Geige LinkDiv über dem absoluten div
.authorTag {
float: right;
position: absolute;
right: 0px;
top: 0px;
z-index: 1000;
background-color: #92AD40;
padding: 5px;
color: #FFFFFF;
font-weight: bold;
cursor: pointer;
}
.DateTag {
float: right;
position: relative;
right: 0px;
top: 0px;
z-index: 1000;
background-color: #92AD40;
padding: 5px;
color: #FFFFFF;
font-weight: bold;
cursor: pointer;
}
.tag {
float: left;
position: absolute;
left: 0px;
top: 0px;
z-index: 1000;
background-color: #92AD40;
padding: 5px;
color: #FFFFFF;
font-weight: bold;
cursor: pointer;
}
.DivTitle {
float: left;
position: absolute;
left: 0px;
bottom: 0px;
z-index: 1000;
background-color: #92AD40;
padding: 5px;
color: #FFFFFF;
font-weight: bold;
cursor: pointer;
width: 100%;
}
.contentContainer {
position: relative;
width: 300px;
height: 300px;
/* top:0;
left:0;*/
border: 1px solid black;
margin: 5px;
}
<div class="contentContainer">
<div class="tag">Featured</div>
<div class="authorTag">authorTag</div>
<div class="DateTag">Time</div>
<img src="https://dummyimage.com/100/000000/fff" width="100%">
<div class="DivTitle"> Title </div>
</div>
das Szenario ein div-Container Bild des Behälters div (Kein Problem füllen, wenn es Hintergrund ist der Behälter div) Titel div am Boden des Behälters vier div in jedem Ecke in dem verbleibenden Raum Hinweis: Der Titel div mit dynamischem Text, der bedeutet, dass es eine oder mehr Linien
danke können Sie das Bild ein div machen, weil es dynamisch zugewiesen wird –
@MaherKhalil können Sie die Bild-URL dynamisch auf die Hintergrund-Bild-URL festlegen, es muss nicht ein div sein. – brian17han
@MaherKhalil etwas wie '$ ('contentContainer').css ('background-image', 'url (' + imageUrl + ')'); ' – brian17han