css实现一个咖啡分类示意图代码
代码语言:html
所属分类:布局界面
代码描述:css实现一个咖啡分类示意图代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css?family=Lato|Lora"); html { display: grid; min-height: 100%; } body { background: #252C32; display: grid; font-family: "Lato", sans-serif; text-transform: uppercase; } h3 { font-size: 0.8em; letter-spacing: 1px; font-weight: 100; } .container { position: relative; margin: auto; overflow: hidden; width: 500px; height: 700px; } .bar { position: absolute; height: 85%; width: 2px; left: 7%; top: 7.5%; background: #F4E8DA; } .circle { width: 10px; height: 10px; position: absolute; border-radius: 50%; left: -5px; border: 1px solid #F4E8DA; box-shadow: 0px 0px 7px #f4e8da; } .top { background: #5B4644; top: -1%; } .middle { background: #87624F; top: 38%; } .bottom { background: #DAB7A3; bottom: -1%; } .bold { color: #87624F; position: absolute; top: -7%; left: -17px; } .creamy { color: #DAB7A3; position: absolute; bottom: -7%; left: -27px; } .info { width: 55%; height: 100%; position: absolute; left: 43%; } .coffee-cups { width: 40%; height: 100%; position: absolute; left: 10%; top: 3%; } .handle { position: absolute; height: 20px; width: 15px; background: transparent; border-radius: 50% 30%; left: 95%; top: 10%; z-index: -1; border: 2px solid #F4E8DA; } .cup { position: absolute; width: 70px; height: 55px; background: #252C32; border: 2px solid #F4E8DA; border-radius: 0 0 5rem 5rem; left: 20%; } .cup-small { position: absolute; width: 55px; height: 40px; background: #252C32; border: 2px solid #F4E8DA; border-radius: 0 0 5rem 5rem; left: 23%; } .cup-long { position: absolute; width: 60px; height: 70px; background: #252C32; border: 2px solid #F4E8DA; border-radius: 10% 10% 50% 50%; left: 22%; } .doppio { top: 5%; background: linear-gradient(to bottom, #252C32 40%, #5B4644 40%, #87624F 70%); } .americano { top: 18.5%; background: linear-gradient(to bottom, #252C32 13%, #859FB5 13%, #859FB5 50%, #87624F 50%); } .macchiato { top: 35%; background: linear-gradient(to bottom, #252C32 20%, #F4E8DA 20%, #F4E8DA 40.........完整代码请登录后点击上方下载按钮下载查看
网友评论0