blinkfox / hexo-theme-matery

A beautiful hexo blog theme with material design and responsive design.一个基于材料设计和响应式设计而成的全面、美观的Hexo主题。国内访问:http://blinkfox.com
https://blinkfox.github.io/
Apache License 2.0
5.23k stars 1.25k forks source link

Hexo 编译后的表格没办法使用 markdown的语法标注文字对齐 #663

Open tdingquan opened 3 years ago

tdingquan commented 3 years ago

materialize.min.css 中的 td, th css 样式中覆盖了下面的attribute中的 text_align 样式。

image

blinkfox commented 3 years ago

只能自定义设置强制样式覆盖了

tdingquan commented 3 years ago

我有一个mr #664 就去掉了里面依赖库的一个样式,把这个问题解决了 请看一下

yanhuacuo commented 7 months ago

hexo-theme-matery\source\css\my.css

下,添加样式表强指了:

/* 表格居中 */

td,
th {
    [padding](https://webplatform.github.io/docs/css/properties/padding): 15px 5px;
    [display](https://webplatform.github.io/docs/css/properties/display): table-cell;
    [text-align](https://webplatform.github.io/docs/css/properties/text-align): center;
    [vertical-align](https://webplatform.github.io/docs/css/properties/vertical-align): middle;
    [border-radius](https://webplatform.github.io/docs/css/properties/border-radius): 0
}

#articleContent table {
    [display](https://webplatform.github.io/docs/css/properties/display): table;
    [width](https://webplatform.github.io/docs/css/properties/width): 100%;
    [border-collapse](https://webplatform.github.io/docs/css/properties/border-collapse): collapse;
    [border-spacing](https://webplatform.github.io/docs/css/properties/border-spacing): 0;
    [overflow](https://webplatform.github.io/docs/css/properties/overflow): auto;
}