css布局实现小鸟效果
代码语言:html
所属分类:布局界面
代码描述:css布局实现小鸟效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> :root { --white: white; --gray-light: #AAAAA9; --gray-dark: #575556; --yellow: #F0C756; } body{ background: #2792CB; } .box-canvas{ position: relative; margin: auto; display: block; margin-top: 8%; margin-bottom: 8%; width: 200px; height:200px; } .box-canvas::before { content: ''; position: absolute; width: 250px; height: 100px; background: #67B3DA; bottom: 0; left: -50px; border-radius: 30% 70% 23% 77% / 53% 30% 70% 47%; } .body { top: 30px; width: 150px; height: 70px; position: absolute; background: var(--white); border-radius: 0 50% 50% 50%; left: 15px; } .wing { position: absolute; left: 30px; top: -4px; width: 125px; height: 60px; background: var(--gray-light); border-radius: 25% 75% 9% 91% / 64% 78% 22% 36%; overflow: hidden; } .tail { position: absolute; background: var(--gray-dark); width: 120px; top: 20px; height: 30px; right: -40px; -webkit-transform: rotate(20deg); transform: rotate(20deg); border-radius: 0 50% 50% 0; } .neck { position: absolute; top: 20px; left: 20px; width: 30px; height: 30px; background: var(--white); border-radius: 50% 50% 0 0; } .head { position: absolute; width: 50px; height: 50px; border-radius: 50% 50% 0 50%; background: var(--white); } .head::befo.........完整代码请登录后点击上方下载按钮下载查看
网友评论0