hexo-theme-material-flow
hexo-theme-material-flow copied to clipboard
table样式显示不正常
貌似css3不支持这种写法,导致table的样式不能应用?
table:not('.highlight table') { width: 100%; td, th { padding: 12px 24px } tr { border-bottom: 1px solid #ddd; } &>thead>th { border-bottom-width: 2px; } }
我查到css3目前不支持这种写法
table:not('.highlight table') 具体参见https://segmentfault.com/q/1010000011693839 希望开发者能提供下修改默认表格的方法,直接改默认会把代码块也改掉
在app.js加上以下逻辑可以解决(不会写css的后端路过) $("table").filter(function(){ return $(this).parent().is(":not(.highlight)"); }).css('width', '100%'); $("table tr td ").filter(function(){ return $(this).parent().is(":not(.highlight)"); }).css('border', '1px solid #242424'); $("table thead tr th ").filter(function(){ return $(this).parent().is(":not(.highlight)"); }).css('border', '1px solid #242424');