css 平行四边形 - 带有额外的HTML元素
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 平行四边形 - 带有额外的HTML元素相关的知识,希望对你有一定的参考价值。
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
// alert('Hello world!');
<a href="#yolo" class="button"><div>Click me</div></a>
<button class="button"><div>Click me</div></button>
/**
* Parallelograms — with extra HTML element
*/
.button { transform: skewX(45deg); }
.button > div { transform: skewX(-45deg); }
.button {
display: inline-block;
padding: .5em 1em;
border: 0; margin: .5em;
background: #58a;
color: white;
text-transform: uppercase;
text-decoration: none;
font: bold 200%/1 sans-serif;
}
以上是关于css 平行四边形 - 带有额外的HTML元素的主要内容,如果未能解决你的问题,请参考以下文章