7

CSS 的应用 —— 去除日志评论中的头像

 2 years ago
source link: https://yihui.org/cn/2005/07/css-hide-avatar/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

CSS 的应用 —— 去除日志评论中的头像

谢益辉 / 2005-07-22


很简单,只是把这段代码添加到单篇文章的 CSS 中就搞定了。

div.operation img{
  display:none;
}

这是利用了 CSS 样式继承的特点。由于评论前面的头像是处于层 div(operation 样式)中,于是 img 标签设置为不显示(display:none;)那么就可以把评论中的所有图片都隐藏了。现在的页面,没了手拉手,没了一大块一大块的头像,真是干净多了……

作者已锁定该文,您没有权限浏览 谈谈英文网站的一个不规范之处

Disqus Utterances Preferences

© Yihui Xie 2005 - 2020

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK