• CSS3初体验之伪元素选择器


    使用CSS3中的伪元素选择器加HTML5实现太极八卦图

    效果图:

        

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>太极八卦</title>
        <style>
            body {
                background-color: rgb(24, 147, 168);
            }
            .father {
                position: relative;
                top: 100px;
                left: 60%;
                width: 400px;
                height: 400px;
                /* background-color: #; */
                /* margin: 100px 0 0 25%; */
                border-radius: 50%;
                overflow: hidden;
                /* transform:rotate(360deg); */
                transition: all 10s;
            }
            .father1 {
                position: relative;
                top: -300px;
                left: 20%;
                width: 400px;
                height: 400px;
                /* background-color: #; */
                /* margin: 100px 25% 0 0; */
                border-radius: 50%;
                overflow: hidden;
                /* transform:rotate(360deg); */
                transition: all 5s;
            }
            .son-l {
                float: left;
                width: 200px;
                height: 400px;
                /* border-radius: 50%; */
                background-color: #fff;
            }
            .son-r {
                float: left;
                width: 200px;
                height: 400px;
                background-color: #000;
            }
            .father::before,
            .father1::before {
                position: absolute;
                top: 0;
                left: 50%;
                margin-left: -100px;
                width: 200px;
                height: 200px;
                content: "";
                background-color: #000;
                border-radius: 50%;
            }
            .father1::after,
            .father::after {
                position: absolute;
                bottom: 0;
                left: 50%;
                margin-left: -100px;
                width: 200px;
                height: 200px;
                content: "";
                background-color: #fff;
                border-radius: 50%;
            }
            .son-t {
                position: absolute;
                top: 50px;
                left: 50%;
                margin-left: -50px;
                width: 100px;
                height: 100px;
                background-color: #fff;
                border-radius: 50%;
            }
            .son-b {
                position: absolute;
                bottom: 50px;
                left: 50%;
                margin-left: -50px;
                width: 100px;
                height: 100px;
                background-color: #000;
                border-radius: 50%;
                z-index: 1;
               
            }
            /* .father:hover, */
            body:hover .father , 
            body:hover .father1 {
                transform: rotate(36000deg);
                /*  600px; */
            }
        </style>
    </head>
    <body>
        <div class="father">
            <div class="son-l">      
            </div>
            <div class="son-r">
            </div>
            <div class="son-t"></div>
            <div class="son-b"></div>
        </div>
        <div class="father1">
                <div class="son-l">      
                </div>
                <div class="son-r">
                </div>
                <div class="son-t"></div>
                <div class="son-b"></div>
            </div>
    </body>
    </html>
  • 相关阅读:
    FaceBook API
    CAP – Consistency, Availability, Partition Tolerance
    Hypothesis Testing
    MOSS 2007中如何添加VariationsLabelMenu来在不同语言的variation间切换?
    用Windows 2008 R2做工作机遇到的IE的安全问题
    如何使用Notepad++快速整理挤在一起的CallStack信息(将换行符作为被替换的内容)
    Managed Metadata Service介绍系列 之四
    MOSS 2007捞取ConfigDB中的数据, 得到内部名所对应的timer job的title及运行状况
    Log Parser分析IIS log的举例
    EventCache表太大, 怎么办?
  • 原文地址:https://www.cnblogs.com/ErrRROooor/p/10667840.html
Copyright © 2020-2023  润新知