css伪类before after 实现立体效果_html/css_WEB-ITnose
程序员文章站
2022-05-13 10:07:15
...
div { width:200px; height:200px; border:1px solid #ccc; position: relative; background-color:#fff; float: left; text-align: center; margin: 30px;}.div1::after { z-index: -15; position: absolute; content: ""; bottom: 14px; right: 7px; width: 36%; top: 59%; max-width: 300px; background: #777; box-shadow: 0 15px 10px #A5A5A5; -webkit-transform: rotate(3deg);}.div1::before { z-index: -15; position: absolute; content: ""; bottom: 14px; left: 6px; width: 36%; top: 59%; max-width: 300px; background: #777; box-shadow: 0 15px 10px #A5A5A5; -webkit-transform: rotate(-3deg);}.div2 { border-bottom-right-radius: 50px; box-shadow: -1px 2px 2px rgba(0, 0, 0, 0.2);}.div2::after { content: ''; width: 22px; height: 22px; position: absolute; bottom: 0px; right: 0px; border-radius: 0 0 16px 0; box-shadow: -2px -2px 5px rgba(65, 65, 65, 0.38); -webkit-transform: rotate(-20deg) skew(-40deg,-3deg) translate(-10px,-10px);}.div3 { border-radius: 60px / 5px;}.div3::after { z-index: -15; position: absolute; content: ""; bottom: 2px; left: 4%; width: 91%; height: 10px; max-width: 300px; background: #777; box-shadow: 0px 4px 11px 1px #A5A5A5; border-radius: 50%;}.div3::before { z-index: -15; position: absolute; content: ""; left: 4%; width: 91%; height: 10px; top: 4px; max-width: 300px; background: #777; box-shadow: 0px -4px 11px 1px #A5A5A5; border-radius: 50%;}
123123123
http://jsfiddle.net/N93a3/
总结:
上一篇: php根据年月获取季度的方法_PHP教程
下一篇: 052新题1
推荐阅读
-
CSS before和after伪元素_html/css_WEB-ITnose
-
css伪类before after 实现立体效果
-
你所不知的 CSS ::before 和 ::after 伪元素用法_html/css_WEB-ITnose
-
CSS伪类:after支不支持播放音频文件_html/css_WEB-ITnose
-
伪类(before和after在这里)_html/css_WEB-ITnose
-
CSS3 target 伪类不得不说那些事儿(纯CSS实现tab切换)_html/css_WEB-ITnose
-
jquery或者js怎么抓取after伪类的内容?_html/css_WEB-ITnose
-
css伪类before after 实现立体效果_html/css_WEB-ITnose
-
css实现的点击具有立体背景变化效果的按钮_html/css_WEB-ITnose
-
伪类(before和after在这里)_html/css_WEB-ITnose