div+css实现三维带阴影消息框泡泡框旋转效果代码
代码语言:html
所属分类:三维
代码描述:div+css实现三维带阴影消息框泡泡框旋转效果代码
代码标签: div css 三维 阴影 消息框 泡泡框 旋转
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Alfa+Slab+One&family=Passion+One:wght@400;700&display=swap"); * { box-sizing: border-box; margin: 0; padding: 0; --color-yellow: #F7C41F; --color-orange: #FC930A; --color-red: #FF003D; --color-mint: #CCF390; --color-slime: #E0E05A; transform-style: preserve-3d; -webkit-transform-style: preserve-3d; } html, body { height: 100%; } h2 { text-align: center; color: #333; font-weight: 400; } body { background: #f7c41f; background: radial-gradient(circle, #f7c41f 0%, #fc930a 65%); display: grid; place-items: center; font-family: "Passion One", cursive; font-weight: 400; perspective: 500px; -webkit-perspective: 500px; perspective-origin: 50% 50%; -webkit-perspective-origin: 50% 50%; } .testimonial { background: var(--color-red); background: linear-gradient(215deg, #ff567e 0%, #ff003d 35%, #da0034 70%); background-size: 200% 200%; padding: 30px; border-radius: 20px; width: 400px; position: relative; color: white; animation: hold 10s infinite ease-in-out, shade 10s infinite ease-in-out; } .testimonial:after { content: ""; position: absolute; width: 100%; height: 100%; bottom: -22px; right: 0; background: var(--color-red); background: linear-gradient(215deg, #ff567e 0%, #ff003d 35%, #da0034 70%); background-size: 200% 200%; clip-path: polygon(80% 80%, 90% 100%, 90% 80%); animation: shade 10s infinite ease-in-out; } .testimonial:before { content: .........完整代码请登录后点击上方下载按钮下载查看
网友评论0