zoukankan      html  css  js  c++  java
  • 利用:before和:after给段落添加效果的应用实例

    效果1:

    <span class="zy-jt">现场施工安装,1对1管家式服务,基础施工/屏体安装</span>
    .zy-jt:before{
    content: "";
    display: inline-block;
    background: url(../images/mic1.png) no-repeat -5px;
    width: 56px;
    height: 8px;
    vertical-align: middle;
    }
    .zy-jt:after {
    content: "";
    display: inline-block;
    background: url(../images/mic2.png) no-repeat 5px;
    width: 56px;
    height: 8px;
    vertical-align: middle;
    }

    效果2:

    <i class="line"></i>
    .line {
    width: 50px;
    height: 2px;
    background: #ff0000;
    display: block;
    margin: 20px 0;
    position: relative;
    }
    .line:before {
    right: -8px;
    }
    .line:after {
    right: -15px;
    }
    .line:before,.line:after {
    content: "";
    width: 2px;
    height: 2px;
    background: #ff0000;
    display: block;
    position: absolute;
    }
  • 相关阅读:
    多重继承
    单继承
    访问限制方法
    猜字游戏
    getSet方法
    访问限制
    __str__函数
    析构函数
    构造函数二
    选择排序
  • 原文地址:https://www.cnblogs.com/xinlvtian/p/12972512.html
Copyright © 2011-2022 走看看