Jquery 我想在html中创建下面这样的推荐图片
请帮助我如何在html中创建这种类型的推荐Jquery 我想在html中创建下面这样的推荐图片,jquery,html,Jquery,Html,请帮助我如何在html中创建这种类型的推荐 您可以使用CSS伪元素:before或:after创建它。我做了一个快速的HTML结构,检查这个 CSS: HTML: 创建三个div。旋转divs到45度。你会得到你想要的谢谢。这对我真的很有帮助。Y .profile { width: 200px; height: 200px; display: block; color: rgba(0, 0, 0, 0); -webkit-transform: rotate(45deg);
您可以使用CSS伪元素:before或:after创建它。我做了一个快速的HTML结构,检查这个 CSS: HTML:
创建三个div。旋转divs到45度。你会得到你想要的谢谢。这对我真的很有帮助。Y
.profile {
width: 200px;
height: 200px;
display: block;
color: rgba(0, 0, 0, 0);
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
margin: 80px;
overflow: hidden;
}
.profile::before {
content: "";
position: absolute;
width: 640px;
height: 393px;
top: -100px;
left: -200px;
z-index: -1;
background: url(https://cdn.pixabay.com/photo/2017/06/26/15/00/seascape-2444040_640.jpg);
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
}
<div class="profile">
<!-- Overlay div content goes here -->
</div>