css+div布局实现图文博客文章折叠效果代码

代码语言:html

所属分类:布局界面

代码描述:css+div布局实现图文博客文章折叠效果代码

代码标签: css div 布局 图文 博客 文章 折叠

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

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

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

  
  
  
<style>
@import url("https://fonts.cdnfonts.com/css/satoshi");
* {
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	scroll-behavior: smooth;
}
html,
body {
	min-height: 100%;
}

body {
	margin: 0;
	font-family: "Satoshi", sans-serif, monospace;
	color: #eee;
	font-size: 18px;
	line-height: 161.8%;
	background: #212431;
	interpolate-size: allow-keywords;
}

::-webkit-scrollbar {
	width: 14px;
}
::-webkit-scrollbar-track {
	background: transparent;
}
::-webkit-scrollbar-thumb {
	background: #ea5c1f;
	border: 4px solid #212431;
	cursor: pointer;
}
::-webkit-scrollbar-thumb:hover {
	background: #ea5c1f77;
}

body :is(h1, h2) {
	color: #ea5c1f;
	width: fit-content;
}
body h1 {
	font-size: 1.8em;
}
article {
	max-width: 618px;
	padding: 8px 24px;
	margin: auto;
	margin-top: 100px;
	margin-bottom: 100px;
	font-weight: 100;
	position: relative;
	overflow: hidden;

	border-bottom: 4px solid #d6d7d711;
	border-left: 4px solid #d6d7d711;

	background: linear-gradient(90deg, #46506433 0%, #4f5d7533);
	border-top-right-radius: 64px;
}
article aside {
	border-left: 4px solid #ea5c1f;
	padding-left: 16px;
	margin-bottom: 16px;
	line-height: 124%;
}
article strong {
	font-weight: 600;
}
article a {
	font-weight: 500;
	color: #ea5c1f;
	text-decoration: none;
	cursor: pointer;
}
article a:hover {
	text-decoration: underline;
}
ar.........完整代码请登录后点击上方下载按钮下载查看

网友评论0