div+css实现一个逼真相机效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css实现一个逼真相机效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { box-sizing: border-box; } body { font-size: 10px; background-repeat: no-repeat; background-size: 700px; background-position: 50% -9.2%; } .snaptouch { font-size: 1.5vmin; width: 76em; height: 56em; position: absolute; top: 49%; left: 50%; transform: translate(-50%, -50%); background: linear-gradient(teal 49%, yellow 51%) 50% 100%/15em 15em; background-repeat: no-repeat; } .snaptouch .logo { font-family: calibri; color: #DEDAD9; position: absolute; border: 1px solid hotpink; } .snaptouch .button { border: 1px solid orange; width: 9em; height: 5em; border-top-left-radius: 3em; border-top-right-radius: 3em; position: absolute; top: 11%; left: 8%; background: #FF7476; box-shadow: inset rgba(0, 0, 0, 0.15) 0px 0px 0px 0.25em; } .snaptouch .flash { width: 21em; height: 7.5em; border-top-left-radius: 1.5em; border-top-right-radius: 1.5em; position: absolute; left: 50%; transform: translatex(-50%); overflow: hidden; box-shadow: inset 0px 0px 0.5em rgba(255, 255, 255, 0.5); background: linear-gradient(to left, rgba(0, 0, 0, 0.7), rgba(51, 51, 51, 0)) 100% 100%/0.5em 100%, #333333; background-repeat: no-repeat; border-bottom-left-radius: 1em; border-bottom-right-radius: 1em; } .snaptouch .flash .flash-inner { width: 100%; height: 90%; position: absolute; bottom: 0; border-radius: inherit; box-shadow: 0em -1.2em 2px -2px #333333 inset, 0em -1.2em 5px -2px rgba(255, 255, 255, 0.3) inset, 0 0.6px 15em -0.2em rgba(0, 0, 0, 0.2) inset, rgba(204, 219, 232, 0.5) 0px 0.3em 2.6em 0px; background: #303030; } .snaptouch .flash .flash-middle { width: 11em; height: 5.2em; border: 0.2em solid #050505; position: absolute; top: 52%; left: 50%; transform: translate(-50%, -50%); border-radius: 1.2em; box-shadow: rgba(255, 255, 255, 0.3) -0.2em -0.2em 0.2em 0px, 0 4px 2px -2px rgba(0, 0, 0, 0.5), 0 -4px 2px -2px rgba(0, 0, 0, 0.5) inset; } .snaptouch .flash .flash-middle-inner { width: 95%; height: 95%; border-radius: inherit; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); box-shadow: rgba(255, 255, 255, 0.1) 0px -0.3em 1px inset, rgba(255, 255, 255, 0.15) 0px 0.3em 5px inset, rgba(0, 0, 0, 0.7) 0px 0em 0.15em 0.3em inset; background: #7A7A7A; background: #4A4A4A; } .snaptouch .flash .flash-middle-inner-inner { width: 85%; height: 72%; position: absolute; top: 52%; left: 50%; transform: translate(-50%, -50%); background: linear-gradient(50deg, transparent 92%, rgba(0, 0, 0, 0.2), #a2a2a2 95%) 70% 100%/78% 1.2em, linear-gradient(to right, #7E7E7E, #7E7E7E) 0% 100%/100% 0.3em, linear-gradient(-40deg, #8B8B8B, 89%, transparent 51%) 0% 100%/100% 1em, linear-gradient(to right, #7E7E7E, #7E7E7E) 0% 0%/100% 0.3em, linear-gradient(to right, #7E7E7E, #7E7E7E) 100% 50%/0.3em 100%, linear-gradient(to right, #7E7E7E, #7E7E7E) 0% 0%/0.3em 100%, linear-gradient(to right, #A2A2A2, #A1A1A1) 100% 100%/1em 100%, linear-gradient(to right, #7E7E7E, #575759, #59585B) 0% 0%/1em 100%, linear-gradient(#6C6C6C 10%, rgba(50, 50, 50, 0.6) 70%) 0% 0%/100% 1.3em, linear-gradient(to left, rgba(0, 0, 0, 0.7), rgba(51, 51, 51, 0)) 100% 100%/0.5em 100%, linear-gradient(to top, #2E2E2E 55%, transparent) 10% 100%/100% 1.4em; background-repeat: no-repeat; } .snaptouch .flash .big-cir.........完整代码请登录后点击上方下载按钮下载查看
网友评论0