div+css布局多图排列图文卡片效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css布局多图排列图文卡片效果代码

代码标签: div css 布局 多图 排列 图文 卡片

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Imprima&family=Lora:ital,wght@0,400..700;1,400..700&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
  
  
  
<style>
/* don't hate the body margin, keep it */
:not(body) { margin: 0 }

html { background: #393939 }

/* grid everything!!! */
body, article, section, figure { display: grid }

body {
	/* limit the one body column; 
	 * I prefer this to setting a max-width 
	 * on the articles */
	grid-template-columns: min(100%, 50em);
	/* middle align the body grid */
	justify-content: center;
	/* ensure a bit of space around the body grid */
	padding: 1em;
	/* prevent breakage at very small sizes;
	 * ideally, I'd change the layout on very narrow 
	 * viewports, but this was just a quick demo */
	min-width: 20em;
	background: #1e1e1e;
	color: #dedede;
	/* scale font size with viewport 
	 * wi.........完整代码请登录后点击上方下载按钮下载查看

网友评论0