zoukankan      html  css  js  c++  java
  • 关于CSS3三角的实现

    1,向上的三角

     1 <!doctype html>
     2 <html>
     3 <head>
     4 <meta charset="utf-8">
     5 <title>border-radius</title>
     6 <style>
     7 div{ 
     8     width:0;
     9     height:0;
    10     border-left:20px solid transparent;
    11     border-right:20px solid transparent;
    12     border-bottom:20px solid #ccc;
    13     }
    14 </style>
    15 </head>
    16 <body>
    17 <div>
    18 </div>
    19 </body>
    20 </html>

    2,向下的三角

     1 <!doctype html>
     2 <html>
     3 <head>
     4 <meta charset="utf-8">
     5 <title>border-radius</title>
     6 <style>
     7 div{ 
     8     width:0;
     9     height:0;
    10     border-left:20px solid transparent;
    11     border-right:20px solid transparent;
    12     border-top:20px solid #ccc;
    13     }
    14 </style>
    15 </head>
    16 <body>
    17 <div>
    18 </div>
    19 </body>

    20 </html> 

    3,向左的三角

     1 <!doctype html>
     2 <html>
     3 <head>
     4 <meta charset="utf-8">
     5 <title>border-radius</title>
     6 <style>
     7 div{ 
     8     width:0;
     9     height:0;
    10     border-top:20px solid transparent;
    11     border-bottom:20px solid transparent;
    12     border-right:20px solid #ccc;
    13     }
    14 </style>
    15 </head>
    16 <body>
    17 <div>
    18 </div>
    19 </body>

    20 </html> 

    4,向右的三角

     1 <!doctype html>
     2 <html>
     3 <head>
     4 <meta charset="utf-8">
     5 <title>border-radius</title>
     6 <style>
     7 div{ 
     8     width:0;
     9     height:0;
    10     border-top:20px solid transparent;
    11     border-bottom:20px solid transparent;
    12     border-left:20px solid #ccc;
    13     }
    14 </style>
    15 </head>
    16 <body>
    17 <div>
    18 </div>
    19 </body>

    20 </html> 

  • 相关阅读:
    Kubernetes
    桥接模式
    原型模式
    工厂模式
    生成器模式
    Java-Sentinel限流中间件
    python模拟发送、消费kafka消息
    使用idea搭建springBoot项目
    linux 虚拟机不能启动不了系统,虚拟机更改linux初始启动5,出现无法启动现象
    vwware workstation虚机网络配置NAT
  • 原文地址:https://www.cnblogs.com/White-Quality/p/4510668.html
Copyright © 2011-2022 走看看