I'm working with Angular and trying to bind an image to a div background. The background need to be darker from the original image so text can be include later :
The problem Is - The image does not show properly inside the boundaries of the div; some parts of the image are missing.
.PictureCover {
background-size: cover;
margin: 10px;
width: 70px;
height: 100px;
float: left;
}
<div class="PictureCover" style="background-image:
linear-gradient(
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0.5)
),
url(http://ift.tt/1Tzql0K);"></div>
The url to the image from the example is temporary and will be replaced with a binding to a image from object in angular so inculding 'background-image' inside the PictureCover css class is not an option.
Thanks.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire