[CSS]更改痞客邦 文章標題的年、月、日

程式碼(痞客邦後台 → 樣式管理 → CSS原始碼):

先找到文章中的

.article-head

因為我的文章年、月、日是顯示在標題最前面,所以當找.article-head

然後在article-head下面有一段:

.publish .date{

font-size:15px;

font-weight: bold;

-webkit-font-smoothing: antialiased;

font-family: Arial,"微軟正黑體";

letter-spacing: .05em;

height:15px;

color:#fff;

}

.publish .day{

display:none;

}

.publish .year{

position:relative;

top:-2px;

}

-------

.publish .year 是指文章發出的時間,也就是2020年、2021年

.publish .date是指標題日期,也就是4月20日、8月16日

.publish .day是指標題禮拜幾,也就是禮拜六、禮拜一…

這些時間資訊都能塞在標題上,畢竟文章的發布日期很重要,尤其是年份!

反而日期(禮拜幾)我覺得還好,不是這麼必要

但以我這個版型為例,他標題預設的資訊是:日期、星期幾

因此我將"星期幾"拿掉

改成:

.publish .day{

display:none;

}

display:none; 就是不要展現的意思

 

然後再將年份放上去(預設是diaplay):

.publish .year{

position:relative;

top:-2px;

}

位置是:relative相對的。

標題年份

這樣一來,文章標題前面就有出現我要的資訊了。

 

 


arrow
arrow

    元元不絕 發表在 痞客邦 留言(0) 人氣()