问答详情
源自:1-2 CSS3中transition属性

为什么显示的不是方块?求指导!!!

<!DOUCTYPE html>

<html>

<head>

  <title></title>

   

    <style>

       #block{

        width:400px;

        height:400px;

        background-color: #69c;

        margin:0 auto;


       -webkit-transition: background-color 3s;

}

       #block:hover{

       background-color: red;

}

</style>

</head>

<body>

     <div id="block">

     </div>

</body>

</html>


提问者:天涯海草 2014-11-02 10:16

个回答

  • l1uyub0b0b0
    2014-11-06 11:30:38

    <!DOUCTYPE html>

    这个是错的。


    另外添加了-webkit前缀,请使用chrome测试