码迷,mamicode.com
首页 > Web开发 > 详细

css before after基本用法【转】

时间:2017-03-18 20:48:33      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:text   play   java   font   bsp   for   color   add   rip   

 

<HTML><HEAD>
<meta http-equiv="content-Type"content="text/html;charset=utf-8">
<TITLE>css before after基本用法</TITLE>
<style>
  


    p::before{
        content: "H" 
    }
    p::after{
        content: "d" 
    }

    a {  
        position: relative; 
        display: inline-block;  
        outline: none;  
        text-decoration: none;  
        color: #000;  
        font-size: 32px;  
        padding: 5px 10px;  
    }  

    a:hover::before, a:hover::after { position: absolute; }  
    a:hover::before { content: "\5B"; left: -10px; }  
    a:hover::after { content: "\5D"; right:  -10px; }  

  </style>

<script type="text/javascript"    src="D:/Old PC/D/html/jQuery/jquery-3.1.0.js" ></script>
<script type="text/javascript">

</script>
</HEAD>
<BODY>
  <p>ello Worl</p>

 


<br/>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  <a href="http://www.baidu.com">aaa</a>
</BODY>
</HTML>

 

css before after基本用法【转】

标签:text   play   java   font   bsp   for   color   add   rip   

原文地址:http://www.cnblogs.com/whatlonelytear/p/6575684.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!