Я пытаюсь наложить одно изображение поверх другого и сделать круговое изображение из них.Работа с css перед селектором
<span onclick="someFunction()" id="swatch_123456" class="slider-color-swatches" style="background-image: url(anyImage.png);"></span>
.slider-color-swatches{
position: relative;
width: 28px;
height: 28px;
border-radius: 50%;
cursor: pointer;
display: inline-block;
vertical-align: top;
overflow: hidden;
margin-bottom: 10px;
margin-right: 10px;
}
.slider-color-swatches::before{
content: '';
position: absolute;
background-image: url('anyOtherIamge.pnenter image description hereg');
left: 20%;
width: 100%;
height: 200%;
top: 0;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
transform: rotate(45deg);
}
Here are the images as to what I want to do and where Iam able to get so far
Можете ли вы опубликовать скрипку своего кода? –
Попробуйте это http://tympanus.net/codrops/css_reference/mask-image/ –