CSS3轮回写轮眼制作

css3新增了不少比较有意思的属性,今天笔者根据css3中的动画属性,简单创作了一个轮回写轮眼,供喜爱动漫的青少年欣赏学习。请先看效果图:这里写图片描述
这里只用到了html和css没有用到JavaScript,jQuery等知识点。笔者下面贴出全部代码,然后对代码中部分知识点进行讲解。请看代码:

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            *{
    padding: 0;margin: 0;}
            html body{
                background: black;
            }
            .box1{
                width: 600px;
                height: 400px;
                background: white;
                border: 5px solid black;
                margin-left: 0px;
                margin-top: 100px;
                border-radius: 0px 100%;
                position: relative;
                transform: rotate(-15deg);
                overflow: hidden;
                float: left;
            }
            .box2{
                width: 600px;
                height: 400px;
                background: white;
                border: 5px solid black;
                margin-left: 0px;
                margin-top: 100px;
                border-radius: 100% 0px;
                position: relative;
                transform: rotate(15deg);
                overflow: hidden;
                float: right;
            }
            .xielunyan{
                width: 200px;
                height: 200px;
                background: black;
                border-radius: 50%;
                position: absolute;
                left: 50%;
                top: 50%;
                margin-left: -100px;
                margin-top: -100px;
                box-shadow: 0px 0px 10px 10px #333;
            }
            .box1 .xielunyan{
                animation: run1 3s infinite linear;
            }
            .box2 .xielunyan{
                animation: run 3s infinite linear;
            }
            .tongkong{
                width: 50px;
                height: 50px;
                border-radius: 50%;
                background: black;
                position: absolute;
                left: 50%;
                top: 50%;
                margin-top: -25px;
                margin-left: -25px;
            }
            .xing1,.xing2,.xing3{
                width: 138px;
                height: 138px;
                border-radius: 100% 0px;
                
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值