zoukankan      html  css  js  c++  java
  • ie6下用css来实现hover效果

    <html>
        <head>
            <title>ie6下hover效果的实现</title>          
            <style>
            /*
                IE6中如果a与a:hover的css定义是一样的,也就是说如果a:hover中没有样式的改变,hover就不会被触发
                在a:hover中增加一些特定的属性,就可以修复此bug(随意增加,,只要不破坏你原来的页面布局即可,我用的是background-repeat)
            */
                   
                * { margin:0;padding:0;}
                a {display:inline-block;padding:10px; line-height:20px;  margin:10px; border:1px solid gray;}
                a:hover { background:url('bg.png') red; background-repeat:no-repeat; /*add style to fixed ie6 hover bug*/}
            </style>
        <head/>
        <body>
                <br />
                <a href="#">链接1</a>
                <a href="#">链接2</a>
                <a href="#">链接3</a>
                <a href="#">链接4</a>
    </body>
    </html>

      

  • 相关阅读:
    DataGird导出EXCEL的几个方法
    csv文件与DataTable互相导入处理
    LeetCode 345
    LeetCode 168
    LeetCode 344
    LeetCode 342
    LeetCode 343
    LeetCode 326
    LeetCode 338
    LeetCode 319
  • 原文地址:https://www.cnblogs.com/playerlife/p/2674848.html
Copyright © 2011-2022 走看看