11 Star 37 Fork 20

Baryy / You-need-to-know-css

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
irregular-projection.md 2.64 KB
一键复制 编辑 原始数据 按行查看 历史
LHammer 提交于 2018-04-08 10:16 . :wrench:style: amend id of vuep'template

不规则投影

?> 背景知识::point_right: filter, radial-gradient, border-image

<script v-pre type="text/x-template" id="irregular-projection"> <style> main { width: 100%; padding: 60px 0 30px 0; display: flex; flex-wrap: wrap; justify-content: space-around; } .projection { width: 228px; height: 180px; margin-bottom: 29px; background: #b4a078; position: relative; } .row1 > .projection:nth-of-type(1) { border-radius: 5px; filter: drop-shadow(2px 2px 2px rgba(180,160,120,.9)); } .row1 > .projection:nth-of-type(1)::before{ content: ''; position: absolute; width: 0; height: 0; top: 65px; right: -20px; border: 22px solid transparent; border-left-color: #b4a078; border-right-width: 0; } .row1 > .projection:nth-of-type(2) { background: transparent; border: 6px dotted #b4a078; filter: drop-shadow(2px 2px 2px rgba(180,160,120,.9)); } .row2 > .projection:nth-of-type(1) { background: radial-gradient(circle at bottom right, transparent 29px, #b4a078 30px) bottom right; filter: drop-shadow(2px 2px 2px rgba(180,160,120,.9)); } .row2 > .projection:nth-of-type(2) { border: 29px dotted #b4a078; border-image: 1 url('data:image/svg+xml, '); filter: drop-shadow(2px 2px 2px rgba(180,160,120,.9)); background-clip: padding-box; } </style>
<script> </script> </script>

浏览器支持

<iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=css-filters&periods=future_1,current,past_1,past_2,past_3&accessible-colours=false" frameborder="0" width="100%" height="458px"></iframe> <iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=css-gradients&periods=future_1,current,past_1,past_2,past_3&accessible-colours=false" frameborder="0" width="100%" height="436px"></iframe> <iframe src="https://caniuse.bitsofco.de/embed/index.html?feat=border-image&periods=future_1,current,past_1,past_2,past_3&accessible-colours=false" frameborder="0" width="100%" height="436px"></iframe>
CSS
1
https://gitee.com/lhammer/You-need-to-know-css.git
git@gitee.com:lhammer/You-need-to-know-css.git
lhammer
You-need-to-know-css
You-need-to-know-css
master

搜索帮助