css实现夜晚炊烟的房子效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现夜晚炊烟的房子效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { padding: 0; margin: 0; box-sizing: border-box; } body { height: 100vh; background: radial-gradient(circle, rgba(14,19,55,1) 67%, rgba(16,3,37,1) 89%); display: flex; justify-content: center; align-items: center; } .container { width: 400px; height: 600px; position: relative; background: linear-gradient(180deg, rgba(22,28,83,1) 3%, rgba(95,39,90,1) 70%, rgba(135,31,65,1) 98%); box-shadow: 0 50px 40px rgba(0,0,0,0.3), 0 10px 10px rgba(0,0,0,0.1); border-radius: 10px; overflow: hidden; } .hill1 { position: absolute; top: 51%; left: -15%; width: 200px; height: 200px; background: rgb(36,32,74); background: linear-gradient(196deg, rgba(36,32,74,1) 57%, rgba(46,10,54,1) 100%); transform: rotate(45deg); } .hill2 { position: absolute; top: 62%; left: 5%; width: 200px; height: 200px; background: linear-gradient(350deg, rgba(35,28,93,1) 43%, rgba(87,50,95,1) 79%); transform: rotate(45deg); } .hill3 { position: absolute; top: 51%; left: 69%; width: 200px; height: 200px; background: rgb(36,32,74); background: linear-gradient(196deg, rgba(36,32,74,1) 57%, rgba(46,10,54,1) 100%); transform: rotate(45deg); } .chimney { position: absolute; width: 5px; height: 20px; top: 61%; left: 63%; background: linear-gradient(to right, #c02425, #f0cb35); } .chimney2 { position: absolute; width: 9px; height: 5px; top: 61%; left: 62.6%; background: linear-gradient(to right, #ff512f, #f09819); } .hut { position: absolute; width: 30px; height: 30px; background: linear-gradient(to right, #f12711, #f5af19); top: 64%; left: 57.3%; } .roof { position: absolute; border-bottom: 5px solid #fd1d1d; width: 40px; height: 25px; top: 61%; left: 56%; background: linear-gradient(to bottom, #c21500, #ffc500); clip-path: polygon(50% 0%, 0 80%, 100% 81%); } .land { position: absolute; top: 67%; left: 0; width: 400px; h.........完整代码请登录后点击上方下载按钮下载查看
网友评论0