• CSS3六边形


    <!DOCTYPE html>
    <!-- saved from url=(0043)http://dbox.whosemind.net/demo/liufang.html -->
    <html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta charset="UTF-8">
      <title>Document</title>
    <style>
    .avatar {
       100px;
      height: 86px;
      position: relative;
      overflow:hidden;
    }
    
    .avatar1:before {
      content: "";
      position: absolute;
      top: 0px;
      right: 0;
       50%;
      border-bottom: 43px solid transparent;
      border-left: 25px solid white;
      border-right: 25px solid white;
    }
    
    .avatar1:after {
      content: "";
      position: absolute;
      bottom: 0px;
       50%;
      right: 0;
      
      border-top: 43px solid transparent;
      border-left: 25px solid white;
      border-right: 25px solid white;
    }
    
    .avatar img{
       100%;
      height: 100%;
    }
    
    .avatar2:before {
      content: "";
      position: absolute;
      top: 0px;
      right: 0;
    
      border-bottom: 29px solid transparent;
      border-left: 50px solid white;
      border-right: 50px solid white;
    }
    
    .avatar2 {
      height: 116px;
    }
    .avatar2:after {
      content: "";
      position: absolute;
      bottom: 0px;
      right: 0;
    
    
      border-top: 29px solid transparent;
      border-left: 50px solid white;
      border-right: 50px solid white;
    }
    
    .avatar3{
      height: 116px;
      transform: rotate(120deg);
    }
    
    .avatar3-inner{
      overflow: hidden;
       100%;
      height: 100%;
      transform: rotate(-60deg);
    }
    
    .avatar3 img{
      transform: rotate(-60deg);
    }
    
    .avatar4{
      height: 90px;
    }
    
    </style>
    </head>
    <body>
    <div class="avatar1 avatar">
      <img src="./Document_files/wallhaven-131731.jpg">
    </div>
    
    <div class="avatar2 avatar">
      <img src="./Document_files/wallhaven-131731.jpg">
    </div>
    
    <div class="avatar3 avatar">
      <div class="avatar3-inner">
        <img src="./Document_files/wallhaven-131731.jpg">
      </div>
    </div>
    
    
    <div class="avatar3 avatar avatar4">
      <div class="avatar3-inner">
        <img src="./Document_files/wallhaven-131731.jpg">
      </div>
    </div>
    <script>
    
    </script>
    
    </body></html>
    

      

  • 相关阅读:
    PAT-A 1004. Counting Leaves
    PAT-A 1094. The Largest Generation
    图的邻接表表示及其BFS遍历
    图的邻接表表示及其遍历
    PAT-A 1024. Palindromic Number
    PAT-A 1019. General Palindromic Number
    PAT-B 1007.素数对猜想
    PAT-A 1048. Find Coins
    PAT-A 1037. Magic Coupon
    PAT-A 1099.Build A Binary Search Tree
  • 原文地址:https://www.cnblogs.com/goodbeypeterpan/p/4185403.html
Copyright © 2020-2023  润新知