Skip to content

Latest commit

 

History

History
75 lines (66 loc) · 2.61 KB

irregular-projection.md

File metadata and controls

75 lines (66 loc) · 2.61 KB

不规则投影

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

<script v-pre type="text/x-template" id="demo1"> <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>