看图效果,
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>Title</title>
- <style>
- div {
- clip-path: polygon(
- 15px 0, calc(100% - 15px) 0,
- 100% 15px, 100% calc(100% - 15px),
- calc(100% - 15px) 100%,
- 15px 100%,
- 0 calc(100% - 15px),
- 0 15px
- );
-
- background-image: linear-gradient(-45deg, #4C829A 10px, #00000000 10px),
- linear-gradient(45deg, #4C829A 10px, #00000000 10px),
- linear-gradient(135deg, #4C829A 10px, #00000000 10px ),
- linear-gradient(-135deg, #4C829A 10px, #00000000 10px);
- background-position: bottom right, bottom left, top left, top right;
- background-size: 15px 15px ;
- background-repeat: no-repeat;
- border: solid 1px #4C829A;
- padding: 15px;
- background-color: #f8d6e0;
- }
- </style>
- </head>
- <body>
- <div>fsdfdsfdfddf</div>
- </body>
- </html>