纯css实现一个收音机布局效果
代码语言:html
所属分类:布局界面
代码描述:纯css实现一个收音机布局效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> /* Tutorials on: fossheim.io */ /* Works best in chrome */ * { padding: 0; margin: 0; box-sizing: border-box; } body { background-color: #E5C657; } .radio { display: block; width: 540px; height: 330px; margin: 150px auto 0 auto; margin: calc(50vh - 160px) auto 0 auto; border-radius: 30px; background-image: linear-gradient( 135deg, #C0BDAE, #B8B9B3, #E5E1E0 ); box-shadow: 0 0 0 8px #DCE3E0 inset, 0px 80px 60px -70px #384140; position: relative; } .speaker { display: block; width: 495px; height: 290px; position: absolute; left: 0; right: 0; margin-left: auto; margin-right: auto; top: 20px; border-radius: 4px 4px 12px 12px; background-image: radial-gradient( transparent 30%, #F1E9E6 40% ), linear-gradient( #EAE7E7, transparent ), linear-gradient( 90deg, #EAE7E7, transparent ), radial-gradient( #141912 50%, transparent 50% ), linear-gradient( 135deg, #A8A39D, #9CA19A ); background-size: 13px 13px, 100% 2px, 2px 100%, 290px 290px, 100% 100%; background-repeat: repeat, repeat, repeat, no-repeat, no-repeat; background-position: 0 0, 20px 0, 0 0; box-shadow: 0 0 0.5px 0.75px #222C21; } .button { display: block; width: 45px; height: 45px; border-radius: 30px; position: absolute; bottom: 15px; background-color: blue; background-image: radial-gradient(#EFF0F4 58%, transparent 62%), radial-gradient(#E0E2DF 20%, #CDC8CB 50%); background-size: 100% 100%, 300% 300%; background-repeat: no-repeat; background-position: 3px 2px, -80px -50px; } .button.right { right: 50px; box-shadow: 15px 10px 20px -8px #717168, 0 0 1.5px -0.5px #717168; } .button.left { right: 145px; box-shadow: 15px 15px 24px -8px #717168, 0 0 1.5px -0.5px #717168; } .selector { display: block; width: 200px; height: 200px; border-radius: 100px; background-color: black; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0