zoukankan      html  css  js  c++  java
  • css实现三角形

      重点2:

      边框透明css属性:transparent   

      死亡的IE6中边框透明需要用到滤镜:/*_filter:chroma(color=#000000);色度滤镜,让IE6实现透明borderColor.这里滤镜的颜色值是不可以简写的*/

    HTML

    <div id="triangle">
    <em class="t_a"></em>
    </div>


    CSS

    代码
    <style>
    div,em
    { margin:0; padding:0;}
    #triangle
    { margin:0 auto; width:500px;}
    .t_a
    { width:0; height:0; font-size:0; line-height:0; display:block;}
    .t_a
    { border-style:solid; border-width:40px; border-color:transparent transparent transparent #603; _filter:chroma(color=#000000);/*滤镜*/}
    </style>

    这里为什么会使这个样子(宽高为0,边框设置下怎么就有三角形了呢?)还不是很明白~望 赐教~~  

  • 相关阅读:
    python笔记目录
    Django 的View(视图)系统
    051_Bootstrap 框架
    050_jQuery 事件
    049_jQuery 操作标签
    048_jQuery
    016-递归函数
    047_BOM_DOM
    046_JS
    045_CSS
  • 原文地址:https://www.cnblogs.com/NetSos/p/1887562.html
Copyright © 2011-2022 走看看