div+css布局实现名人名言引用卡片效果代码
代码语言:html
所属分类:布局界面
代码描述:div+css布局实现名人名言引用卡片效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @charset "UTF-8"; * { padding: 0; margin: 0; box-sizing: border-box; font-family: "Montserrat", sans-serif; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; overflow: hidden; } .testimonial { width: 500px; max-width: 100%; background: #ffca52; padding: 4em 3em; display: flex; align-items: flex-end; position: relative; box-shadow: 0 2px 2px rgba(0, 0, 0, 0.075), 0 3px 3px rgba(0, 0, 0, 0.075), 0 5px 5px rgba(0, 0, 0, 0.075), 0 9px 9px rgba(0, 0, 0, 0.075), 0 17px 17px rgba(0, 0, 0, 0.075); position: relative; } .testimonial:after { content: ""; border: 8px solid navy; border-radius: 50px; width: 85%; height: 120%; position: absolute; z-index: -1; left: 1.5em; top: -2em; } .testimonial:before { content: ""; position: absolute; bottom: -6.2em; left: 5em; z-index: 1; width: 0; height: 0; border-style: solid; border-width: 70px 100px 0 0; border-color: navy transparent transparent transparent; } .testimonial .quote { position: absolute; font-size: 3em; width: 40px; height: 40px; background: navy; color: #fff; text-align: center; line-height: 1.25; } .testimonial .quote.open { top: 0; left: 0; } .testimonial .quote.close { bottom: 0; right: 0; } .testimonial p { width: 60%; display: inline-block; font-weight: bold; font-size: 1.25em; } .testimonial .source { width: 40%; height: 100%; position: relative; } .testimonial .source span { display: inline-block; font-weight: bold; font-size: 1.15em; position: relative; margin-left: 1rem; t.........完整代码请登录后点击上方下载按钮下载查看
网友评论0