I have a pattern that repeats in both X and Y that I want to use as background
in a div
, but I would like it to fall within div
as shown in the image. (I want you to have only full stars in the background) . I wanted the% w_ of% to be adjusted so as not to cut pieces of the stars, being made up only of whole figures.
Isthereanywaytocontrolhowthebackgroundrepeatsitselfinsidethecontainertopreventsomepiecesfrombeingcut?
isfixed,canvaryheightandwidth)
.x {
width: 200px;
height: 200px;
margin-right: 10px;
font-size: 3rem;
color: red;
background-image: url(https://cdn0.iconfinder.com/data/icons/Toolbar_Icon_Set_by_shlyapnikova/32/star.png);
}
<div class="x"></div>