css布局实现热气腾腾的咖啡效果
代码语言:html
所属分类:布局界面
代码描述:css布局实现热气腾腾的咖啡效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <style> body { background: #3a000a; margin: 0; padding: 0; } .cup{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 150px; height: 160px; background: #fff; border-bottom-left-radius: 20px; border-bottom-right-radius: 20px; } .cup:before{ content: ''; position: absolute; top: 0; left:0; height: 30px; width: 100%; border-radius: 50%; background:#c16d31; border: 7px solid #fff; box-sizing: border-box; transform: translateY(-50%); box-shadow: inset 0 0 15px rgba(0,0,0,.5); } .cup:after{ content: ''; position: absolute; top: 48%; right: -50px; height: 90px; width: 80px; border-radius: 50%; background:transparent; border: 12px solid #fff; box-sizing: border-box; transform: translateY(-50%); } .plate{ width:250px ; height: 30px; border-bottom-left-radius: 40%; border-bottom-right-radius: 40%; background: #.........完整代码请登录后点击上方下载按钮下载查看
网友评论0