在論壇或網頁設計中,分隔線常用於區分不同內容或版塊,以提升頁面的美觀性和可讀性。以下是幾種常見的分隔線樣式,適合用於「尋夢」主題的版塊:
.separator {
border-top: 1px solid #ccc;
margin: 20px 0;
}
#ccc
為其他顏色(如淺藍色、淺紫色)以匹配主題。 .gradient-separator {
height: 2px;
background: linear-gradient(90deg, #6a11cb, #2575fc);
margin: 20px 0;
}
.dashed-separator {
border-top: 2px dashed #999;
margin: 20px 0;
}
#999
為更柔和的顏色。 .pattern-separator {
height: 10px;
background: url('pattern.png') repeat-x;
margin: 20px 0;
}
.animated-separator {
height: 2px;
background: #6a11cb;
margin: 20px 0;
position: relative;
overflow: hidden;
}
.animated-separator::before {
content: '';
position: absolute;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, #2575fc, transparent);
animation: move 2s linear infinite;
}
@keyframes move {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
<div class="icon-separator">
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
<i class="fas fa-star"></i>
</div>
<style>
.icon-separator {
text-align: center;
margin: 20px 0;
color: #6a11cb;
}
</style>
以上樣式可以根據具體需求進行調整,以更好地契合「尋夢」主題的夢幻感和藝術感。