单个div+css实现立体凹凸效果代码
代码语言:html
所属分类:布局界面
代码描述:单个div+css实现立体凹凸效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { min-height: 300px; height: 100vh; position: relative; background-color: #ff69b4; } div { position: absolute; left: 50%; top: 50%; } @media (max-width: 400px) { div:not(.no-scale) { transform: scale(0.8); } } #impossible { width: 20em; height: 8.5em; margin-left: -10em; margin-top: -4.25em; background: linear-gradient(120deg, transparent 12.5%, #ffd2e9 12.5%, #ffd2e9 87.5%, transparent 87.5%) 0 0/44% 25%, linear-gradient(60deg, transparent 29.8%, #fff0f8 29.8%, #fff0f8 50%, transparent 50%) 0 2.125em/44% 75%, linear-gradient(60deg, transparent 29.8%, #fff0f8 29.8%, #fff0f8 50%, transparent 50%) 5em 2.125em/44% 75%, linear-gradient(#fff0f8, #fff0f8) 10% 2.125em/25% 25%, linear-gradient(#ff.........完整代码请登录后点击上方下载按钮下载查看
网友评论0