正在回答 回答被采纳积分+1
5回答
或許冭假
2017-01-06 21:57:56
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | * { margin : 0 ; padding : 0 ; } /*蓝天*/ body > div:first-of-type { position : relative ; /*overflow: hidden;*/ width : 100 vw; height : 50 vh; background : linear-gradient(to bottom , rgb ( 196 , 228 , 253 ), #ffffff ); } /*蓝天*/ body > div:last-of-type { position : relative ; bottom : 0 ; width : 100 vw; height : 50 vh; background : linear-gradient(to bottom , #ffffff , rgb ( 148 , 190 , 89 )); } /*云的样式*/ body > div:first-of-type > div > div.cloud, body > div:first-of-type > div > div.cloud:before, body > div:first-of-type > div > div.cloud:after, body > div:first-of-type > div > div.cloud > div { width : 0 ; height : 0 ; border : 2.5 vw solid transparent ; border-radius: 2.5 vw; background : white ; } body > div:first-of-type > div > div.cloud { position : relative ; } body > div:first-of-type > div > div.cloud:before { position : absolute ; display : block ; content : '' ; top : -2 vw; left : -5.5 vw; transform: scale(. 6 ); } body > div:first-of-type > div > div.cloud:after { position : absolute ; display : block ; content : '' ; top : -1.2 vw; left : -4.9 vw; transform: scale( 0.5 ); } body > div:first-of-type > div > div.cloud > div:first-of-type { position : absolute ; top : -1.3 vw; left : -6.5 vw; transform: scale( 0.4 ); } body > div:first-of-type > div > div.cloud > div:last-of-type { position : absolute ; top : -1.4 vw; left : -. 7 vw; transform: scale( 0.5 ); } /*设置云为绝对定位*/ body > div:first-of-type > div { position : absolute ; right : -10 vw; } /*云的摆放位置*/ body > div:first-of-type > div:nth-of-type( 1 ) { top : 5 vh; transform: scale( 0.8 ); } body > div:first-of-type > div:nth-of-type( 2 ) { top : 7 vh; transform: scale( 0.6 ); } body > div:first-of-type > div:nth-of-type( 3 ) { top : 9 vh; transform: scale( 0.6 ); } body > div:first-of-type > div:nth-of-type( 4 ) { top : 11 vh; transform: scale(. 4 ); } body > div:first-of-type > div:nth-of-type( 5 ) { top : 13 vh; transform: scale(. 5 ); } /*云的动画通用设置*/ body > div:first-of-type > div { will-change: animation; animation: cloud_animation ease-in-out infinite; } body > div:first-of-type > div:nth-of-type( 1 ) { animation-duration: 11 s; } body > div:first-of-type > div:nth-of-type( 2 ) { animation-duration: 6 s; animation-delay: 2 s; } body > div:first-of-type > div:nth-of-type( 3 ) { animation-duration: 9 s; animation-delay: 4 s; } body > div:first-of-type > div:nth-of-type( 4 ) { animation-duration: 8 s; animation-delay: 1 s; } body > div:first-of-type > div:nth-of-type( 5 ) { animation-duration: 7 s; animation-delay: 1.5 s; } /*动画的关键帧*/ @keyframes cloud_animation { from { right : -10 vw; } to { right : 110 vw; } } /*兔子*/ body > div:last-of-type > div.rabbit { position : absolute ; max-width : 100px ; max-height : 100px ; transform: scale(. 1 ); bottom : 50px ; right : 200px ; transform-origin: left top ; background : url ( "../images/rabbit.png" ) no-repeat center ; } |
或許冭假
2017-01-06 21:57:23
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | <!DOCTYPE html> < html lang = "en" > < head > < meta charset = "UTF-8" > < title >蓝天白云</ title > < link rel = "stylesheet" href = "css/cloud.css" /> </ head > < body > <!--蓝天--> < div > < div > <!--云--> < div class = "cloud" > < div ></ div > < div ></ div > </ div > </ div > < div > <!--云--> < div class = "cloud" > < div ></ div > < div ></ div > </ div > </ div > < div > <!--云--> < div class = "cloud" > < div ></ div > < div ></ div > </ div > </ div > < div > <!--云--> < div class = "cloud" > < div ></ div > < div ></ div > </ div > </ div > < div > <!--云--> < div class = "cloud" > < div ></ div > < div ></ div > </ div > </ div > </ div > <!--绿地--> < div > <!--兔子--> < div class = "rabbit" ></ div > </ div > </ body > </ html > |
HTML5与CSS3实现动态网页 2018
- 参与学习 1887 人
- 提交作业 4643 份
- 解答问题 5760 个
有HTML和CSS基础,却不知道如何进阶?本路径带你通过系统学习,完成从“会做网页”到“做出好的动态网页”的蜕变,迈出成为前端工程师的第一步。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧