App下載
首頁htmlbannerPage Widget - 如何創(chuàng)建橫幅切出

Page Widget - 如何創(chuàng)建橫幅切出

我們想知道如何創(chuàng)建橫幅切出。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
div {
  width: 250px;
  padding: 9px 0 9px 5%;
  color: #fff;
  background-color: #d32f36;
  clip-path: url(#mask);
  -webkit-clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
  clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
}
</style>
</head>
<body>
  <div>Banner text here</div>
  <!-- For firefox -->
  <svg class="svg-graphic" width="250" height="36" viewBox="0 0 250 36"
    xmlns="http://www.w3.org/2000/svg"
    xlink="http://www.w3.org/1999/xlink" version="1.1">
    <clipPath id="mask">
        <polygon points="0, 0, 250, 0, 235, 18, 248, 35, 1, 35, 15, 18" />
    </clipPath>
</svg>
</body>
</html>