This article introduces the implementation code of CSS warped shadow and shares it with everyone. The details are as follows: If you look closely, you can see that the two corners at the bottom of each picture have varying degrees of warping. The implementation principle is similar to [CSS] curve shadow, and is also achieved through pseudo-elements. HTML Code <ul class="box"> <li><img src="......" alt=""></li> <li><img src="......" alt=""></li> <li><img src="......" alt=""></li> </ul> CSS Code ul,li { list-style:none; } .box { width: 980px; height: auto; clear: both; overflow: hidden; margin: 20px auto; } .box li { width: 300px; height: 210px; position: relative; background: #fff; float: left; margin: 20px 10px; border: 2px solid #efefef; box-shadow: 0 1px 4px rgba(0, 0, 0, .27), 0 0 60px rgba(0, 0, 0, 0.1) inset; } .box li img { display: block; width: 290px; height: 200px; margin: 5px; } .box li:before, .box li:after { content: ''; position: absolute; z-index: -2; width: 80%; height: 80%; bottom: 8px; background: transparent; box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6); } .box li:before { left: 7%; transform: skewX(-12deg) rotate(-4deg); } .box li:after { right: 7%; transform: skewX(12deg) rotate(4deg); } The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. |
<<: MySQL primary key naming strategy related
>>: HTML Tutorial: Collection of commonly used HTML tags (5)
1. What is MySQL master-slave synchronization? Wh...
Friends always ask me how to hide Linux processes...
Often you will encounter a style of <a> tag ...
Border Style The border-style property specifies ...
Table of contents What is virtual dom? Why do we ...
1. Resume nacos database Database name nacos_conf...
Table of contents Overview Property settings Proc...
Preface: Partitioning is a table design pattern. ...
Table of contents background Solution 1 Ideas: Co...
This article is based on the CentOS 7.3 system en...
MySQL reports an error when executing multi-table...
Table of contents Docker-Maven-Plugin Maven plugi...
Table of contents What is a skeleton screen? Demo...
Table of contents 1. Mathematical functions 2. St...
This article example shares the specific code of ...