首页 > 软件开发 > HTML >

html+css3实现电脑和手机传输动画

来源:互联网 2023-03-16 19:11:04 131

html css3实现电脑和手机传输动画95I办公区 - 实用经验教程分享!

工具/原料

  • adobe dreamweaver

方法/步骤

  • 1

    新建html文档。95I办公区 - 实用经验教程分享!

    html css3实现电脑和手机传输动画95I办公区 - 实用经验教程分享!

  • 1本页面非法爬取自百度经验
  • 2

    书写hmtl代码。95I办公区 - 实用经验教程分享!

    div class="container">95I办公区 - 实用经验教程分享!

    h3 class="head">连接服务器/h3>95I办公区 - 实用经验教程分享!

    div class="component PC">95I办公区 - 实用经验教程分享!

    div class="flare">/div>95I办公区 - 实用经验教程分享!

    /div>95I办公区 - 实用经验教程分享!

    div class="component signals">95I办公区 - 实用经验教程分享!

    div class="dot first">/div>95I办公区 - 实用经验教程分享!

    div class="dot second">/div>95I办公区 - 实用经验教程分享!

    div class="dot third">/div>95I办公区 - 实用经验教程分享!

    /div>95I办公区 - 实用经验教程分享!

    div class="component server">95I办公区 - 实用经验教程分享!

    div class="slot">/div>95I办公区 - 实用经验教程分享!

    div class="slot">/div>95I办公区 - 实用经验教程分享!

    div class="button">/div>95I办公区 - 实用经验教程分享!

    div class="button">/div>95I办公区 - 实用经验教程分享!

    /div>95I办公区 - 实用经验教程分享!

    /div>95I办公区 - 实用经验教程分享!

    html css3实现电脑和手机传输动画95I办公区 - 实用经验教程分享!

  • 3

    初始化css代码。body { margin: 0; padding: 0; background: #CCC; }95I办公区 - 实用经验教程分享!

    .container { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 500px; margin: 0px; }95I办公区 - 实用经验教程分享!

    .head { width: 100%; text-align: center; font-family: 'Lato', sans-serif; padding-bottom: 20px; font-weight: normal; color: #222; letter-spacing: 1px }95I办公区 - 实用经验教程分享!

    .component { float: left; margin: 10px; position: relative; }95I办公区 - 实用经验教程分享!

    .PC { height: 100px; width: 40%; border: 5px solid #333; border-radius: 5px; position: relative; }95I办公区 - 实用经验教程分享!

    .PC:before { content: ''; width: 5px; height: 20px; border: 5px solid #333; position: relative; left: 50%; transform: translate(-50%); top: 100px; display: block; background: #333; }95I办公区 - 实用经验教程分享!

    .PC:after { content: ''; width: 40px; height: 0px; border: 4px solid #333; position: relative; left: 50%; transform: translate(-50%); top: 95px; display: block; border-radius: 3px; }95I办公区 - 实用经验教程分享!

    .PC .flare { width: 50px; height: 1px; background: #AAA; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-45deg); }95I办公区 - 实用经验教程分享!

    .PC .flare:after, .PC .flare:before { content: ''; width: 30px; height: 1px; background: inherit; position: absolute; top: -5px; left: 50%; transform: translate(-50%, -50%); }95I办公区 - 实用经验教程分享!

    .PC .flare:after { top: 6px; }95I办公区 - 实用经验教程分享!

    .signals { width: 30%; height: 100px; }95I办公区 - 实用经验教程分享!

    .signals .dot { width: 10px; height: 10px; background: #444; display: inline-block; border-radius: 50%; position: absolute; left: 30%; top: 50%; opacity: 0; transform: translate(-50%, -50%); animation: blink 0.3s ease-in infinite alternate; }95I办公区 - 实用经验教程分享!

    .signals .first { margin-left: 0px; }95I办公区 - 实用经验教程分享!

    html css3实现电脑和手机传输动画95I办公区 - 实用经验教程分享!

  • 4

    书写css代码。95I办公区 - 实用经验教程分享!

    .signals .second { margin-left: 30px; animation-delay: 0.1s; }95I办公区 - 实用经验教程分享!

    .signals .third { margin-left: 60px; animation-delay: 0.2s; }95I办公区 - 实用经验教程分享!

    .server { width: 12%; height: 130px; border: 5px solid #333; border-radius: 5px; position: relative }95I办公区 - 实用经验教程分享!

    .server .slot { display: block; background: #444; width: 90%; height: 8%; margin: 10% 5%; position: relative; top: 55%; border-radius: 2px; }95I办公区 - 实用经验教程分享!

    .server .button { width: 6px; height: 6px; background: #444; display: inline-block; border-radius: 50%; position: absolute; right: 20%; bottom: 5%; }95I办公区 - 实用经验教程分享!

    .server .button:last-of-type { height: 8px; width: 8px; right: 5%; }95I办公区 - 实用经验教程分享!

    @-webkit-keyframes blink { from {95I办公区 - 实用经验教程分享!

    opacity: 095I办公区 - 实用经验教程分享!

    }95I办公区 - 实用经验教程分享!

    to { opacity: 1 }95I办公区 - 实用经验教程分享!

    }95I办公区 - 实用经验教程分享!

    @media only screen and (max-width: 500px) {95I办公区 - 实用经验教程分享!

    .container { width: 100%; min-width: 100% }95I办公区 - 实用经验教程分享!

    .component { display: block; float: left; clear: both; left: 50%; transform: translateX(-50%); }95I办公区 - 实用经验教程分享!

    .signals { transform: translateX(-50%) rotate(90deg); }95I办公区 - 实用经验教程分享!

    .server { width: 17%; }95I办公区 - 实用经验教程分享!

    }95I办公区 - 实用经验教程分享!

    html css3实现电脑和手机传输动画95I办公区 - 实用经验教程分享!

  • 5

    代码整体结构。95I办公区 - 实用经验教程分享!

    html css3实现电脑和手机传输动画95I办公区 - 实用经验教程分享!

  • 6

    查看效果。95I办公区 - 实用经验教程分享!

    html css3实现电脑和手机传输动画95I办公区 - 实用经验教程分享!

  • 以上方法由办公区教程网编辑摘抄自百度经验可供大家参考!95I办公区 - 实用经验教程分享!


    标签: HTML

    办公区 Copyright © 2016-2023 www.bgqu.net. Some Rights Reserved. 备案号:湘ICP备2020019561号统计代码