css實現切角效果

CSS HTML 教育 小楊同學愛技術 2017-06-08

切角效果如下

css實現切角效果

實現代碼:

<!DOCTYPE html>

<html>

<head>

<title></title>

<meta charset="utf-8">

<style type="text/css">

div{

padding: 1em 1.2em;

max-width: 12em;

color: white;

font: 150%/1.6 Baskerville, Palatino, serif;

background: #58a;

background: linear-gradient(-45deg, transparent 15px, #58a 0);

}

</style>

</head>

<body>

<div>

i love css i love css i love css i love css

</div>

</body>

</html>

相關推薦

推薦中...