我想只用CSS创建此背景/边框,但我有一些困难: 如何在图像周围创建两个边框或框阴影?
我的代码:
.profile-userpic img {
width: 80%;
background-color: transparent;
box-shadow: -10px -10px 0 0px #291026, 10px 10px 0 0px #f00;
}
<div class="profile-userpic">
<img src="{% get_avatar_url usuario %}" class="img-responsive " alt="">
</div>
其实我得到这个:
我只需要将带有边框的透明对象中的红色背景变形,就像原始设计一样
图片需要有响应,我需要在其他元素(如按钮或div)中使用此“边框/背景”。
thxx人,这是完美的! –