|
|
<style>
/* 标题容器:包含正副标题和原有图形 */
.title-container {
width: 800px;
margin: 30px auto;
text-align: center;
}
/* 正标题样式 */
.main-title {
font: bold 2.5em sans-serif;
color: #333;
margin: 0 0 10px 0;
text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}
/* 副标题样式 */
.sub-title {
font: 1.2em sans-serif;
color: #666;
margin: 0 0 20px 0;
letter-spacing: 2px;
}
/* 原有图形样式保持不变 */
.txtbox {
margin: 20px auto;
width: 740px;
height: 300px;
color: #eee;
text-shadow: 1px 1px 2px silver;
background: linear-gradient(36deg, #1a237e 50%, #90caf9 50.5%, #90caf9 0);
border: 1px solid gray;
font: bold 4em sans-serif;
display: grid;
place-items: center;
}
.txtbox p {
mix-blend-mode: difference;
}
</style>
<!-- 标题容器:包含正副标题和图形 -->
<div class="title-container">
<!-- 正标题 -->
<h1 class="main-title">人生哲理系列</h1>
<!-- 副标题 -->
<h2 class="sub-title">大道至简 · 黑白分明</h2>
<!-- 原有图形 -->
<div class="txtbox">
<p>自古黑白两分明</p>
</div>
</div>
|
|