阅读steemit上面文章的时候,有一个让我特别不舒服的地方:文章中的标题距离下方内容太近,如下图所示。 <img src="https://steemitimages.com/DQmQMhgtoGVtYT2mS3YpHAE5BwTJ68FTQ5fVKbAD1tZLWsf/1.png" align="middle" /> 查看CSS文件,原因是二级及以下级别的标题marign属性设置的问题:距离上边界2.5rem,下边界只有0.3rem。代码及效果分别如下所示。 .Markdown h2, .ReplyEditor__body.rte h2 { margin: 2.5rem 0 .3rem; font-size: 140%; } <center><img src="https://steemitimages.com/DQmeWdyP91ua2Y3gjsbcLkR1D3PQBMAtC5kpvcsXcCsRRP7/2.png" align="middle" /></center> 解决的办法有两种:**修改CSS样式**和**在标题后面插入空白段落**。 <h2 style="margin: 1.5rem 0 1.5rem;">方法一:修改CSS样式</h2> 我们没法直接修改steemit的CSS文件,能做的只有修改自己的文章排版方式。Markdown的好处之一是支持html语法,可以通过内联CSS的方式来设置我们想要的样式。而内联CSS的优先级高于外部文件,也就不会受到steemit原始CSS文件的限制。 实现方式如下,**在Markdown编辑器中写文章的时候不用“#”来设置标题,而是采用下面的html语法直接设置想要的标题级别**。 <h2 style="margin: 1.5rem 0 1.5rem;">这里是标题内容</h2> <p></p> 效果如上面的标题所示。完美的解决了我的强迫症需要。 ## 方法二:在标题后面插入空白段落 <p> </p> 如果你觉得上面的方法有点麻烦,还有一种最简单的方法是:直接在标题下面插入一个空白段落,效果就是这里你看到的。 ## 这里是标题内容 <p> </p> <p> </p> 以上供参考,希望对同样有点强迫症的你有用。 ------------ 本文完,以下是近期的其他文章: - [推荐两部韩国电影和一本关于韩国的书](https://steemit.com/cn/@drunkevil/moives-and-book-from-south-korea) - [2012~2015:读研究生的三年](https://steemit.com/cn/@drunkevil/over-three-years) - [打电话投诉了一次长城宽带,结果超出了我的预期](https://steemit.com/cn/@drunkevil/customer-complaint) - [复旦大学校园里那些值得一看的地方](https://steemit.com/cn/@drunkevil/campus-of-fudan) - [再次回到母校,偶遇复旦大学的几位老校长](https://steemit.com/cn/@drunkevil/presidents-of-fudan-university) ------------ <center> <p> <img src="https://steemitimages.com/DQmXZVWSwFDbuFpBx7qXk3XKvwZmw4CigvwuYnoUBL3a9xw/upvote.png" > <br> 您的点赞(Upvote),转帖(Resteem),留言(Reply)是对我最大的鼓励,谢谢!<a href="https://steemit.com/@drunkevil">@drunkevil</a> </p> </center> ------------
author | drunkevil |
---|---|
permlink | modify-the-title-style-of-steemit |
category | cn |
json_metadata | {"tags":["cn","cn-reader","steemit"],"image":["https://steemitimages.com/DQmQMhgtoGVtYT2mS3YpHAE5BwTJ68FTQ5fVKbAD1tZLWsf/1.png","https://steemitimages.com/DQmeWdyP91ua2Y3gjsbcLkR1D3PQBMAtC5kpvcsXcCsRRP7/2.png","https://steemitimages.com/DQmXZVWSwFDbuFpBx7qXk3XKvwZmw4CigvwuYnoUBL3a9xw/upvote.png"],"app":"steemit/0.1","format":"markdown","links":["https://steemit.com/cn/@drunkevil/moives-and-book-from-south-korea","https://steemit.com/cn/@drunkevil/over-three-years","https://steemit.com/cn/@drunkevil/customer-complaint","https://steemit.com/cn/@drunkevil/campus-of-fudan","https://steemit.com/cn/@drunkevil/presidents-of-fudan-university","https://steemit.com/@drunkevil"]} |
created | 2017-09-21 17:44:18 |
last_update | 2017-09-22 09:13:06 |
depth | 0 |
children | 4 |
last_payout | 2017-09-28 17:44:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 15.048 HBD |
curator_payout_value | 4.934 HBD |
pending_payout_value | 0.000 HBD |
promoted | 1.000 HBD |
body_length | 1,699 |
author_reputation | 8,031,279,202,083 |
root_title | steemit文章排版中标题距离下方内容太近的两种解决方案 |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 0 |
post_id | 15,544,286 |
net_rshares | 7,633,670,205,177 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
abit | 0 | 3,843,730,792,552 | 8% | ||
fundurian | 0 | 33,501,000,088 | 25% | ||
arcange | 0 | 14,064,142,902 | 4% | ||
ubg | 0 | 527,759,853 | 1% | ||
raphaelle | 0 | 2,286,119,295 | 4% | ||
cryptoninja | 0 | 169,584,605 | 1.6% | ||
warofcraft | 0 | 22,471,593,239 | 4% | ||
rivalhw | 0 | 98,049,292,793 | 45% | ||
bestmz | 0 | 25,694,121,372 | 100% | ||
tumutanzi | 0 | 1,589,773,195,463 | 8% | ||
yuxi | 0 | 7,874,251,765 | 100% | ||
htliao | 0 | 734,587,415,403 | 4% | ||
linuslee0216 | 0 | 1,041,702,870,230 | 5% | ||
pula78 | 0 | 256,588,371 | 100% | ||
justyska | 0 | 189,003,916 | 100% | ||
changbrook | 0 | 0 | 100% | ||
karliks | 0 | 207,539,200 | 100% | ||
nicolebh | 0 | 213,734,400 | 100% | ||
nellyrocks | 0 | 223,027,200 | 100% | ||
roqueone | 0 | 365,617,964 | 100% | ||
sherriechau | 0 | 406,242,182 | 100% | ||
renafuam | 0 | 348,207,584 | 100% | ||
joykit | 0 | 391,387,233 | 100% | ||
promoted | 0 | 169,995,437,040 | 5% | ||
hannahwu | 0 | 4,272,901,604 | 67% | ||
drunkevil | 0 | 4,846,605,165 | 100% | ||
shaiya | 0 | 3,638,245,248 | 100% | ||
idx | 0 | 1,695,548,023 | 8% | ||
bertaroyer | 0 | 342,397,116 | 100% | ||
altaq | 0 | 336,593,775 | 100% | ||
cherio | 0 | 354,003,797 | 100% | ||
ribblepascual | 0 | 201,344,000 | 100% | ||
seibsleskl131 | 0 | 188,953,600 | 100% | ||
meharbankert | 0 | 195,148,800 | 100% | ||
metteserve | 0 | 219,929,600 | 100% | ||
manzaneirajenna | 0 | 204,441,600 | 100% | ||
copherexilorme | 0 | 185,856,000 | 100% | ||
harmannmorgan | 0 | 198,246,400 | 100% | ||
lavonnebatlinerr | 0 | 204,441,600 | 100% | ||
cannizzozephieri | 0 | 188,953,600 | 100% | ||
orourkepage | 0 | 189,029,142 | 100% | ||
smedleyobieby | 0 | 216,832,000 | 100% | ||
griglikbenack | 0 | 192,051,200 | 100% | ||
dariasaponta | 0 | 185,856,000 | 100% | ||
beyersduba | 0 | 179,660,800 | 100% | ||
aiporlanibenjez | 0 | 182,758,400 | 100% | ||
adragnaphilmore | 0 | 182,758,400 | 100% | ||
garudi | 0 | 285,913,622 | 4% | ||
scarfatojennaii | 0 | 201,344,000 | 100% | ||
bezelllivintoni | 0 | 182,758,400 | 100% | ||
giannicoangla | 0 | 195,148,800 | 100% | ||
reevaweiden | 0 | 201,344,000 | 100% | ||
asparasjenna | 0 | 179,660,800 | 100% | ||
schlitzrhymes | 0 | 219,929,600 | 100% | ||
ranskijenna | 0 | 198,246,400 | 100% | ||
gubseribbotsona | 0 | 201,344,000 | 100% | ||
julissaboeckmann | 0 | 185,856,000 | 100% | ||
mccalliehart | 0 | 204,441,600 | 100% | ||
leverhelgeq | 0 | 188,953,600 | 100% | ||
jemisondeku | 0 | 198,246,400 | 100% | ||
ranseydrink | 0 | 226,124,800 | 100% | ||
haytonmomper | 0 | 198,246,400 | 100% | ||
alinesherwood | 0 | 179,660,800 | 100% | ||
ganngenes | 0 | 185,856,000 | 100% | ||
purdieabrah | 0 | 216,832,000 | 100% | ||
zerangueproctor | 0 | 235,417,600 | 100% | ||
cercadotinishai | 0 | 185,856,000 | 100% | ||
feildigbiemp | 0 | 185,856,000 | 100% | ||
prantherbocklund | 0 | 207,539,200 | 100% | ||
martscierleylq | 0 | 204,441,600 | 100% | ||
mynchjenna | 0 | 195,148,800 | 100% | ||
cooganrozina | 0 | 192,051,200 | 100% | ||
bembibushie | 0 | 179,660,800 | 100% | ||
carlitafass | 0 | 188,953,600 | 100% | ||
butterbaughokit | 0 | 353,998,968 | 100% | ||
sheppardmanfred | 0 | 406,228,323 | 100% | ||
demaskyfri | 0 | 348,195,706 | 100% | ||
dawanosc | 0 | 185,856,000 | 100% | ||
gelseyhoskyn | 0 | 192,051,200 | 100% | ||
lenzostaback | 0 | 195,148,800 | 100% | ||
bloomstromcouls | 0 | 348,195,235 | 100% | ||
derosekira | 0 | 371,408,249 | 100% | ||
smithwickschlum | 0 | 371,407,904 | 100% | ||
adamsiiij | 0 | 342,391,661 | 100% | ||
czarnieckie | 0 | 330,785,164 | 100% | ||
eikenberry | 0 | 383,014,398 | 100% | ||
baylesament | 0 | 342,391,658 | 100% | ||
kampffromen | 0 | 359,801,403 | 100% | ||
heeschenriq | 0 | 388,817,645 | 100% | ||
gatherhaefner | 0 | 383,014,396 | 100% | ||
redtea | 0 | 2,515,912,722 | 100% | ||
xiaoshancun | 0 | 193,110,699 | 100% | ||
cordydrelick | 0 | 330,778,839 | 100% | ||
kassayavrosz | 0 | 383,007,076 | 100% | ||
polmonoti | 0 | 394,613,351 | 100% | ||
gongshapin | 0 | 371,400,799 | 100% | ||
ferronicrich | 0 | 348,188,247 | 100% | ||
kronberger | 0 | 377,203,935 | 100% | ||
victory622 | 0 | 7,212,670,967 | 38% | ||
etzel | 0 | 1,510,512,068 | 100% | ||
ping-ping | 0 | 1,654,341,231 | 100% | ||
brendashockley | 0 | 150,880,124 | 25% | ||
dennisphillips | 0 | 156,683,205 | 25% | ||
jeannababara | 0 | 667,349,767 | 100% | ||
chaoxia | 0 | 1,044,532,895 | 100% |
感谢分享实用性排版技巧。
author | bestmz |
---|---|
permlink | re-drunkevil-modify-the-title-style-of-steemit-20170922t025802517z |
category | cn |
json_metadata | {"tags":["cn"],"app":"steemit/0.1"} |
created | 2017-09-22 03:03:27 |
last_update | 2017-09-22 03:03:27 |
depth | 1 |
children | 1 |
last_payout | 2017-09-29 03:03:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 12 |
author_reputation | 22,152,342,570,197 |
root_title | steemit文章排版中标题距离下方内容太近的两种解决方案 |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,577,826 |
net_rshares | 0 |
谢谢你的关注,希望对大家有用。
author | drunkevil |
---|---|
permlink | re-bestmz-re-drunkevil-modify-the-title-style-of-steemit-20170922t033227686z |
category | cn |
json_metadata | {"tags":["cn"],"app":"steemit/0.1"} |
created | 2017-09-22 03:32:27 |
last_update | 2017-09-22 03:32:27 |
depth | 2 |
children | 0 |
last_payout | 2017-09-29 03:32:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 15 |
author_reputation | 8,031,279,202,083 |
root_title | steemit文章排版中标题距离下方内容太近的两种解决方案 |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,579,409 |
net_rshares | 0 |
使用steemit编辑器修改文章时不能插入本地图片吗?
author | drunkevil |
---|---|
permlink | re-drunkevil-modify-the-title-style-of-steemit-20170921t180108576z |
category | cn |
json_metadata | {"tags":["cn"],"app":"steemit/0.1"} |
created | 2017-09-21 18:01:12 |
last_update | 2017-09-21 18:01:12 |
depth | 1 |
children | 0 |
last_payout | 2017-09-28 18:01:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 27 |
author_reputation | 8,031,279,202,083 |
root_title | steemit文章排版中标题距离下方内容太近的两种解决方案 |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,545,568 |
net_rshares | 0 |
Very nice completion of post! @drunkevil Loved the pictures and description.
author | jeannababara |
---|---|
permlink | re-drunkevil-modify-the-title-style-of-steemit-20170921t175805473z |
category | cn |
json_metadata | {"tags":["cn"],"users":["drunkevil"],"app":"steemit/0.1"} |
created | 2017-09-21 17:58:06 |
last_update | 2017-09-21 17:58:06 |
depth | 1 |
children | 0 |
last_payout | 2017-09-28 17:58:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 77 |
author_reputation | -854,165,099,059 |
root_title | steemit文章排版中标题距离下方内容太近的两种解决方案 |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,545,329 |
net_rshares | 0 |