HOLIC · 深度解读

歌手: 神谷浩史

/* 建立一个名为 "lyrics" 的类,用于容纳歌词内容 */
.lyrics {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
  color: #333; 
  line-height: 1.6; 
  padding: 20px;
}

/* 定义歌词中的标题部分样式 */
.title {
  font-size: 1.5em; 
  margin-bottom: 10px; 
  text-align: center; 
  color: #555; 
  font-weight: bold; 
}

/* 定义歌词中的每一行文本样式 */
.line {
  font-size: 1em; 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  margin: 5px 0; 
}

/* 定义歌词时间标签的样式 */
.time {
  width: 40px; 
  font-size: 0.8em; 
  color: #888; 
  text-align: right; 
}

/* 定义歌词内容的样式 */
.content {
  flex-grow: 1; 
  padding-left: 10px; 
  position: relative; 
}

/* 在歌词内容后面添加一个渐变背景,表示歌词的进度条效果 */
.content::after {
  content: '';
  position: absolute; 
  bottom: -100%; 
  left: 0; 
  height: 100%; 
  width: 0; 
  transition: all 0.3s ease; 
  background: linear-gradient(to right, #ff9e64 0%, transparent 100%);
}

/* 当歌词被选中时,显示完整的渐变背景条 */
.content.selected::after {
  width: 100%;
}
```js

🎧 猜你喜欢

共 8 首

🎲 随机歌词

共 8 首