div+css布局实现引言卡片效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现引言卡片效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css?family=Lato:700|Noticia+Text:400i&display=swap"); * { box-sizing: border-box; padding: 0; margin: 0; } body { display: flex; min-height: 100vh; justify-content: center; align-items: center; background: hsl(250, 85%, 97%); perspective: 500px; } article { width: 350px; display: flex; flex-direction: column; align-items: center; background: hsl(0, 0%, 100%); line-height: 2; border-radius: 10px; margin: 0.5rem; transition: transform 0.2s ease-out; box-shadow: 0 0 5px -2px hsla(0, 0%, 0%, 0.1); } article div { text-align: center; margin: 2rem; } article div .text { color: hsl(250, 5%, 45%); font-weight: 400; font-style: italic; margin: 1rem 0 3rem; font-family: "Noticia Text", serif; position: relative; z-index: 5; } article div p:before { content: ""; position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; transform: translate(-50%, -50%); z-index: -5; opacity: 0.05; background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 70 70" width="70" height="70"><rect x="0" y="40" width="30" height="30"></rect><path d="M 0 40 q 0 -40 30 -40 v 15 q -15 0 -15 25"></path><rect x="40" y="40".........完整代码请登录后点击上方下载按钮下载查看
网友评论0