美文网首页
css一段过渡模块的代码

css一段过渡模块的代码

作者: nickNic | 来源:发表于2019-07-30 10:14 被阅读0次
    C765ECB5-17C6-428E-A2A7-B7D94334C712.png 屏幕快照 2019-07-30 上午10.08.14.png

    好了上代码

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
    
      *{
        margin: 0px;
        padding: 0px;
      }
    
      div{
        background-color: yellow;
        height: 100px;
        width: 800px;
        margin: 100px auto;
        text-align: center;
        line-height: 100px;
    
      }
    
      span{
        height: 100px;
        width: 100px;
        border: 1px red solid;
        display: block;
        float: left;
        box-sizing: border-box;
        transition: width,0.8s;
    
      }
    
      div:hover span{
        width: 70px;
    
      }
      div span:hover{
        width: 310px;
    
      }
    
    </style>
    </head>
    <body>
    <div>
      <span>不</span>
      <span>涨</span>
      <span>工</span>
      <span>资</span>
      <span>就</span>
      <span>跑</span>
      <span>路</span>
      <span>吧</span>
    </div>
    </body>
    </html>
    

    相关文章

      网友评论

          本文标题:css一段过渡模块的代码

          本文链接:https://www.haomeiwen.com/subject/svkgrctx.html