css实现响应式异形图文列表效果代码
代码语言:html
所属分类:响应式
代码描述:css实现响应式异形图文列表效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> @import url(https://fonts.googleapis.com/css?family=Lato:100,300,400,700); * { box-sizing: border-box; } body { margin: 0; min-width: 320px; background: #333; font-family: "Lato", sans-serif; color: #ddd; font-weight: 300; } .container { margin: 0 auto; padding: 0 20px; } @media (min-width: 1200px) { .container { max-width: 1200px; } } .quick-fact { margin-top: 120px; padding: 20px; border: 1px solid #ccc; border-radius: 20px; } .quick-fact p { margin: 0; } .quick-fact__img { margin-top: -120px; margin-bottom: 20px; text-align: center; } .quick-fact__img img { max-width: 100%; height: auto; border-radius: 34% 66% 70% 30%/30% 30% 70% 70%; box-shadow: 20px 10px 0 -5px rgba(255, 255, 255, 0.5), -2px 15px 0 -5px rgba(255, 255, 255, 0.5); } @media (min-width: 768px) { .quick-fact { display: flex; align-items: center; gap: 40px; margin: 40px 0; padding: 20px 40px; } .quick-fact h2 { margin: 0; } .quick-fact__img { flex: 0 0 auto; max-width: 20%; margin-top: auto; margin-bottom: auto; margin-left: -60px; } .quick-fact__content { display: flex; align-items: center; width: 100%; } .quick-fact__title { border-right: 1px solid #ccc; flex-basis: fit-content; margin-right: 20px; padding-right: 20px; } .quick-fact__desc { flex: 1 0 66.6666666667%; } } </style> </head> <body translate="no"> <div class="container"> <div class="quick-fact"> <div cla.........完整代码请登录后点击上方下载按钮下载查看
网友评论0