zoukankan      html  css  js  c++  java
  • css 伪元素分享!!!

    最近接触到的css 伪元素觉得还算不错 分享下:

    1、清楚内盒浮动设置:

    .back_list ul{padding:12px 0 0 12px;zoom:1;}
    .back_list ul:after{clear: both;content: ".";display: block;height: 0;visibility: hidden;}/*清楚内盒浮动设置*/

    2、伪元素after设置,在元素之后添加内容

    .afterxx{width:400px;height:200px; background-color:#999;border-radius:10px;margin:50px;position:relative;}
    .afterxx:after{color:#999;font-size:94px;content:"◀";position:absolute;left:-23px;top:16%;}

    3、伪元素before设置,在元素之前添加内容

    .beforexx{width:300px;height:100px;}
    .beforexx:before{content:url(back_listimg.jpg);}

    注:IE8版本以下不支持标注2和3的属性

  • 相关阅读:
    刷题238. Product of Array Except Self
    刷题236. Lowest Common Ancestor of a Binary Tree
    刷题208. Implement Trie (Prefix Tree)
    A1070
    A1048
    A1050
    A1041
    A1092
    A1084
    n进制转十进制
  • 原文地址:https://www.cnblogs.com/ninali/p/3569717.html
Copyright © 2011-2022 走看看