<!DOCTYPE html>
<html>
<head>
	<title>三段式网页设计模板</title>
	<style>
		body {
			margin: 0;
			padding: 0;
		}
		.container {
			display: flex;
			flex-direction: column;
			height: 100vh;
		}
		.row1 {
			flex: 1;
			background-image: url('https://picsum.photos/1200/800');
			background-repeat: no-repeat;
			background-size: cover;
		}
		.row2 {
			display: flex;
			flex: 1;
		}
		.row2 .col1 {
			flex: 1;
			background-image: url('https://picsum.photos/600/600');
			background-repeat: no-repeat;
			background-size: cover;
		}
		.row2 .col2 {
			flex: 1;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			background-color: #f8f8f8;
			padding: 20px;
		}
		.row3 {
			flex: 1;
			display: flex;
			background-color: #f8f8f8;
		}
		.row3 .col1 {
			flex: 1;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			padding: 20px;
		}
		.row3 .col2 {
			flex: 1;
			background-image: url('https://picsum.photos/800/800');
			background-repeat: no-repeat;
			background-size: cover;
		}
		h1, h2, p {
			margin: 0;
			padding: 0;
			text-align: center;
		}
	</style>
</head>
<body>
	<div class='container'>
		<div class='row1'></div>
		<div class='row2'>
			<div class='col1'></div>
			<div class='col2'>
				<h1>左边图片,右边文字</h1>
				<h2>Lorem ipsum dolor sit amet</h2>
				<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed malesuada volutpat pharetra. Pellentesque euismod in ipsum eu ullamcorper.</p>
			</div>
		</div>
		<div class='row3'>
			<div class='col1'>
				<h2>上面文字,左下图片</h2>
				<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed malesuada volutpat pharetra. Pellentesque euismod in ipsum eu ullamcorper.</p>
			</div>
			<div class='col2'></div>
		</div>
	</div>
</body>
</html>
三段式网页设计模板:图片、文字布局示例

原文地址: https://www.cveoy.top/t/topic/oXgY 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录