纯css布局实现恐龙蛋破蛋而出效果代码
代码语言:html
所属分类:布局界面
代码描述:纯css布局实现恐龙蛋破蛋而出效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { min-height: 400px; height: 100vh; position: relative; background-color: #d2b48c; text-align: center; } div { position: absolute; left: 50%; top: 50%; } div:before, div:after { display: block; content: ''; position: absolute; } @media (max-width: 400px) { div:not(.no-scale) { -webkit-transform: scale(0.8); transform: scale(0.8); } } #egg { width: 300px; height: 300px; margin-left: -150px; margin-top: -135px; background-repeat: no-repeat; background-image: radial-gradient(ellipse, #cd853f 40%, rgba(205,133,63,0) 40.5%); background-size: 100% 18%; background-position: 50% 102%; } #egg:before { width: 210px; height: 290px; left: 50%; margin-left: -105px; bottom: 15px; background-repeat: no-repeat; background-image: radial-gradient(circle, #b0e0e6 50%, transparent 50.5%), radial-gradient(circle, #b0e0e6 50%, transparent 50.5%), radial-gradient(circle, #b0e0e6 50%, transparent 50.5%), radial-gradient(circle, #b0e0e6 50%, transparent 50.5%), linear-gradient(55deg, #e0ffff 68%, rgba(255,255,255,0) 68.5%), linear-gradient(-30deg, #e0ffff 82%, rgba(255,255,255,0) 82.5%), linear-gradient(60deg, #e0ffff 78%, rgba(255,255,255,0) 78.5%), linear-gradient(-60deg, #e0ffff 82%, rgba(255,255,255,0) 82.5%), linear-gradient(60deg, #e0ffff 82%, rgba(255,255,255,0) 82.5%), linear-gradient(-70deg, #e0ffff 65%, rgba(255,255,255,0) 65.5%), linear-gradient(40deg, #e0ffff 65%, rgba(255,255,255,0) 65.5%), linear-gradient(-70deg, #e0ffff 75%, rgba(255,255,255,0) 75.5%), linear-gradient(-60deg, #e0ffff 83%, rgba(255,255,255,0) 83.5%), linear-gradient(45deg, #556b2f 75%, rgba(0,0,0,0) 75.5%), linear-gradient(50deg, #556b2f 78%, rgba(0,0,0,0) 78.5%), linear-gradient(-55deg, #556b2f 65%, rgba(0,0,0,0) 65.5%), linear-gradient(-55deg, #556b2f 75%, rgba(0,0,0,0) 75.5%), linear-gradient(.........完整代码请登录后点击上方下载按钮下载查看
网友评论0