纯css布局实现柠檬汽水效果
代码语言:html
所属分类:布局界面
代码描述:纯css布局实现柠檬汽水效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> * { padding: 0; margin: 0; } .wrapper { background: #009873; position: absolute; width: 100%; height: 100%; overflow: hidden; } .wrapper .glass { position: relative; left: 45%; top: 50%; width: 150px; height: 250px; border: 5px solid #fff; border-top: none; border-radius: 0 0 5px 5px; transform: perspective(10px) rotateX(-1deg); z-index: 1000; box-shadow: 10px 10px 25px 15px rgba(0, 0, 0, 0.2); } .wrapper .glass:after { content: ""; width: 150px; height: 30px; background: transparent; position: absolute; bottom: 0; background: radial-gradient(100% 120% at top, transparent 50%, #fff 51%); z-index: 1000; } .wrapper .glass .liquid { background: rgba(115, 198, 140, 0.5); position: absolute; width: 150px; height: 220px; bottom: 0; overflow: hidden; z-index: 10; } .wrapper .glass .liquid2 { background: rgba(255, 255, 255, 0.25); height: 249px; border-top: 0.2px solid rgba(255, 255, 255, 0.4); width: 150px; } .wrapper .glass .straw { border: 5px solid #35231a; border-bottom: 0; border-right: 0; height: 200px; width: 50px; position: abso.........完整代码请登录后点击上方下载按钮下载查看
网友评论0