首页 > 软件开发 > HTML >

html+CSS3动画库

来源:互联网 2023-03-16 19:10:42 57

html CSS3动画库J8t办公区 - 实用经验教程分享!

工具/原料

  • adobe dreamweaver

方法/步骤

  • 1

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

    html CSS3动画库J8t办公区 - 实用经验教程分享!

  • 2

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

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

    headergrouJ8t办公区 - 实用经验教程分享!

    h1>strong>Repaintless.css/strong> 演示页面/h1>J8t办公区 - 实用经验教程分享!

    h2>点击 PLAY按钮开始元素动画。你可以分别点击各个按钮来显示或隐藏相应的动画。/h2>J8t办公区 - 实用经验教程分享!

    /headergrouJ8t办公区 - 实用经验教程分享!

    label class="single-filter all-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="element-animated"/>J8t办公区 - 实用经验教程分享!

    span>All/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

    label class="single-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="slide-from-right" />J8t办公区 - 实用经验教程分享!

    span>Slide from right/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

    label class="single-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="slide-from-left" />J8t办公区 - 实用经验教程分享!

    span>Slide from left/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

    label class="single-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="slide-from-top" />J8t办公区 - 实用经验教程分享!

    span>Slide from top/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

    label class="single-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="slide-from-bottom" />J8t办公区 - 实用经验教程分享!

    span>Slide from bottom/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

    label class="single-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="slide-from-right-bottom" />J8t办公区 - 实用经验教程分享!

    span>Slide from right bottom/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

    label class="single-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="slide-from-right-top" />J8t办公区 - 实用经验教程分享!

    span>Slide from right top/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

    label class="single-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="slide-from-left-bottom" />J8t办公区 - 实用经验教程分享!

    span>Slide from left bottom/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

    label class="single-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="slide-from-left-top" />J8t办公区 - 实用经验教程分享!

    span>Slide from left top/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

    label class="single-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="slide-left-right" />J8t办公区 - 实用经验教程分享!

    span>Slide left right/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

    label class="single-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="slide-top-bottom" />J8t办公区 - 实用经验教程分享!

    span>Slide top bottom/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

    label class="single-filter">J8t办公区 - 实用经验教程分享!

    input type="checkbox" rel="tremble" />J8t办公区 - 实用经验教程分享!

    span>Tremble/span>J8t办公区 - 实用经验教程分享!

    /label>J8t办公区 - 实用经验教程分享!

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

    html CSS3动画库J8t办公区 - 实用经验教程分享!

  • 3

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

    .related { margin-top: 50px; color: #fff; background: #494A5F; text-align: center; font-size: 1.25em; padding: 0.5em 0; overflow: hidden; }J8t办公区 - 实用经验教程分享!

    .related > a { vertical-align: top; width: calc(100% - 20px); max-width: 340px; display: inline-block; text-align: center; margin: 20px 10px; padding: 25px; font-family: "Microsoft YaHei", "宋体", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo; }J8t办公区 - 实用经验教程分享!

    .related a { display: inline-block; text-align: left; margin: 20px auto; padding: 10px 20px; opacity: 0.8; -webkit-transition: opacity 0.3s; transition: opacity 0.3s; -webkit-backface-visibility: hidden; }J8t办公区 - 实用经验教程分享!

    .related a:hover, .related a:active { opacity: 1; }J8t办公区 - 实用经验教程分享!

    .related a img { max-width: 100%; opacity: 0.8; border-radius: 4px; }J8t办公区 - 实用经验教程分享!

    .related a:hover img, .related a:active img { opacity: 1; }J8t办公区 - 实用经验教程分享!

    .related h3 { font-family: "Microsoft YaHei", sans-serif; }J8t办公区 - 实用经验教程分享!

    .related a h3 { font-weight: 300; margin-top: 0.15em; color: #fff; }J8t办公区 - 实用经验教程分享!

    .icon-htmleaf-home-outline:before { content: "\e5000"; }J8t办公区 - 实用经验教程分享!

    .icon-htmleaf-arrow-forward-outline:before { content: "\e5001"; }J8t办公区 - 实用经验教程分享!

    @media screen and (max-width: 50em) {J8t办公区 - 实用经验教程分享!

    .htmleaf-header { padding: 3em 10% 4em; }J8t办公区 - 实用经验教程分享!

    .htmleaf-header h1 { font-size: 2em; }J8t办公区 - 实用经验教程分享!

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

    @media screen and (max-width: 40em) {J8t办公区 - 实用经验教程分享!

    .htmleaf-header h1 { font-size: 1.5em; }J8t办公区 - 实用经验教程分享!

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

    @media screen and (max-width: 30em) {J8t办公区 - 实用经验教程分享!

    .htmleaf-header h1 { font-size: 1.2em; }J8t办公区 - 实用经验教程分享!

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

    html CSS3动画库J8t办公区 - 实用经验教程分享!

  • 4

    书写并添加js代码。J8t办公区 - 实用经验教程分享!

    script src="js/jquery-1.11.0.min.js">/script>J8t办公区 - 实用经验教程分享!

    script>J8t办公区 - 实用经验教程分享!

    $(document).ready(function () {J8t办公区 - 实用经验教程分享!

    var checkbox = $('.single-filter').find('input:checkbox');J8t办公区 - 实用经验教程分享!

    checkbox.attr("checked", false);J8t办公区 - 实用经验教程分享!

    $('.all-filter').find('input:checkbox').attr("checked", true);J8t办公区 - 实用经验教程分享!

    J8t办公区 - 实用经验教程分享!

    $('#play-animation').on('click', function () {J8t办公区 - 实用经验教程分享!

    this.remove();J8t办公区 - 实用经验教程分享!

    J8t办公区 - 实用经验教程分享!

    $('.main-container').find('.element-animated').each(function (){J8t办公区 - 实用经验教程分享!

    this.classList.add("animation-running");J8t办公区 - 实用经验教程分享!

    });J8t办公区 - 实用经验教程分享!

    J8t办公区 - 实用经验教程分享!

    $('.all-filter').find('input:checkbox').attr("checked", true);J8t办公区 - 实用经验教程分享!

    });J8t办公区 - 实用经验教程分享!

    J8t办公区 - 实用经验教程分享!

    checkbox.on('click', function () {J8t办公区 - 实用经验教程分享!

    $('.element-animated').css({"opacity" : "0"});J8t办公区 - 实用经验教程分享!

    $('div.filters-container').find('input:checked').each(function () {J8t办公区 - 实用经验教程分享!

    $('.element-animated.' $(this).attr('rel')).css({"opacity" : ".8"});J8t办公区 - 实用经验教程分享!

    });J8t办公区 - 实用经验教程分享!

    });J8t办公区 - 实用经验教程分享!

    });J8t办公区 - 实用经验教程分享!

    /script>J8t办公区 - 实用经验教程分享!

    html CSS3动画库J8t办公区 - 实用经验教程分享!

  • 4该信息未经授权抓取自百度经验
  • 5

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

    html CSS3动画库J8t办公区 - 实用经验教程分享!

  • 6

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

    html CSS3动画库J8t办公区 - 实用经验教程分享!

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


    标签: HTML

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