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

css,响应鼠标事件,文字变色

时间:2019-02-07 09:19:59      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:head   lang   16px   black   tle   splay   html   ext   鼠标   

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>hover</title>
</head>
<body>
    <style type="text/css">
        .s1{
            /*background-color: gold;*/
            font-size:0;
        }

        .s1 span{
            width:98px;
            height: 30px;
            border:1px solid black;
            display:inline-block;
            padding: 0;
            font-size:16px;
            margin-left:-1px;
            text-align: center;
            line-height: 30px;
        }

        .s1 span:hover{
            background-color: gold;
        }
    </style>

    <div class="s1">
        <span>标题</span>
        <span>标题</span>
        <span>标题</span>
        <span>标题</span>
    </div>
</body>
</html>

  

css,响应鼠标事件,文字变色

标签:head   lang   16px   black   tle   splay   html   ext   鼠标   

原文地址:https://www.cnblogs.com/chenadong/p/10354393.html

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