App下載
首頁htmlbannerPage Widget - 如何裁減橫幅

Page Widget - 如何裁減橫幅

我們想知道如何裁減橫幅。

<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.banner {
  position: relative;
  margin: 20px
}

.banner:before {
  content: "Category name";
  position: absolute;
  top: 5px;
  left: -8px;
  padding-right: 15px;
  color: #fff;
  font-weight: bold;
  height: 0px;
  border: 20px solid #a20000;
  border-right-color: transparent;
  line-height: 0px;
  box-shadow: 0 8px 8px -5px rgba(0, 0, 0, 0.75);
  z-index: 1;
}

.banner:after {
  content: "";
  position: absolute;
  top: 45px;
  left: -8px;
  border: 4px solid #000;
  border-left-color: transparent;
  border-bottom-color: transparent;
}

body {
  font-size: 13px;
}
</style>
</head>
<body>
  <div class="banner">
    
  </div>
</body>
</html>