css 折角效果 - 有角度
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 折角效果 - 有角度相关的知识,希望对你有一定的参考价值。
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
// alert('Hello world!');
<div>“The only way to get rid of a temptation is to yield to it.”
— Oscar Wilde, The Picture of Dorian Gray</div>
/**
* Folded corner effect — at an angle
*/
div {
position: relative;
width: 12em;
background: #58a; /* Fallback */
background: linear-gradient(-150deg, transparent 1.5em, #58a 0);
padding: 2em;
color: white;
font: 100%/1.6 Baskerville, Palatino, serif;
border-radius: .5em;
}
div::before {
content: '';
position: absolute;
top: 0; right: 0;
width: 1.73em; height: 3em;
background: linear-gradient(to left bottom, transparent 50%, rgba(0,0,0,.2) 0, rgba(0,0,0,.4)) 100% 0 no-repeat;
transform: translateY(-1.3em) rotate(-30deg);
transform-origin: bottom right;
border-bottom-left-radius: .5em;
box-shadow: -.2em .2em .3em -.1em rgba(0,0,0,.15)
}
以上是关于css 折角效果 - 有角度的主要内容,如果未能解决你的问题,请参考以下文章
css 折角效果
CSS 折角效果
CSS 折角效果
div折角~~~
css 折角
边框折角效果