图集1/1

正文 1377字数 739,217阅读

代码:
<style> .border{ width: 0px; height:0px; border-top: 30px solid transparent; border-left: 30px solid blue; border-right: 30px solid transparent; border-bottom: 30px solid transparent; } </style><div class="border"></div>
Run code
Cut to clipboard

    效果

    给小三角形加阴影效果
    代码:
    <style>.Father{ position: relative; width: 200px; height: 100px; background-color: #fafafa; box-shadow: 0 0 5px #444; border-radius: 4px; } .ThreeC{ position: absolute; top: 30px; right: -30px; width: 0; height: 0; border-top: 20px solid transparent; border-bottom:20px solid #fafafa; border-left: 20px solid #fafafa; border-right: 20px solid transparent; transform: rotate(-135deg); box-shadow: 0px 0px 5px #444; }</style> <div class="Father"> a <div class="ThreeC"></div> </div>
    Run code
    Cut to clipboard