html部分:

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>首页</title>
		<link rel="stylesheet" href="./css/index.css">
	</head>
	<body>
		<div class="box"></div>
		<script src="./js/index.js"></script>
	</body>
</html>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>商品详情</title>
	</head>
	<link rel="stylesheet" href="./css/home.css">
	<body>
		<div class="box">

			<div><strong>积分:20</strong>
				<strong>人气:99</strong>
			</div>

		</div> -->
		</div>
		<script src="./js/home.js"></script>
	</body>
</html>

css部分:

* {
	margin: 0;
	padding: 0;
}

.box {
	width: 50%;
	margin-left: 1%;
	display: flex;
	flex-wrap: wrap;
	margin: 0 auto;
}

.item {
	width: 44%;
	margin: 1% 10px;
}

.item img {
	width: 100%;
	height: 300px;
}

.item p {
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	line-height: 36px;
}

.item div {
	width: 100%;
	display: flex;
	justify-content: space-between;
}
* {
	margin: 0;
	padding: 0;
}

.box {
	width: 50%;
	margin-left: 1%;
	display: flex;
	flex-wrap: wrap;
	margin: 0 auto;
}

.head {
	width: 100%;
	display: flex;
	align-items: center;
}

.head img {
	width: 20px;
	height: 20px;
}

h1 {
	margin: 0 auto;
}

.item {
	width: 44%;
	margin-top: 5%;
	margin-left: 30%;
}

.item img {
	width: 100%;
	height: 300px;
}

.item p {
	white-space: nowrap;
	text-overflow: ellipsis;
	overflow: hidden;
	line-height: 36px;
}

.item div {
	width: 100%;
	display: flex;
	justify-content: space-between;
}

JavaScript部分:

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐