n/websiteu/Str · 2025-02-07
注册 登录
n/website · 2025-02-07 · 493 次浏览
u/Str荣誉会员王者

一个css文件,解决 99% 网站排版问题

只需要一个小小的css文件,就可以让你的网站排版变得无可挑剔的干净

食用方法:

  • 2. 备份你的网站,避免操作途中出现意外

  • 2. 把css复制粘贴保存到你的网站内(建议创建css文件)

  • 3. 清空缓存并刷新

  • 4. 回来评价效果如何,你只需要评价是否和我说的效果(非常干净)一样

  • 5. Enjoy!

~~~~点击 </s>&lt;/&gt;<e> 复制 &ensp;↓&ensp;&ensp;

```css

  • {
    overflow-wrap: break-word;
    /*Note: In contrast to word-break, overflow-wrap (word-wrap is now an alias of overflow-wrap) will only create a break if an entire word cannot be placed on its own line without overflowing.
    https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap

    I think this is a proper solution of too long messages without any spaces which may overflow the paragraph, though i dont know how official hack.chat client does the same thing.*/
    }
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
    margin: 3px;
    margin-top: 0px;
    }
    html,
    body {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    }
    input[type="checkbox"] {
    margin: 0;
    margin-right: 1em;
    }

label {
vertical-align: 3px;
}

input,
textarea {
background: none;
border: none;
outline: none;
resize: none;
max-height: 400px;
}

h4 {
font-size: 12px;
margin: 1em 0;
font-weight: bold;
}

pre {
tab-size: 2;
white-space: pre-wrap;
word-wrap: break-word;
-o-tab-size: 4;
-moz-tab-size: 4;
tab-size: 4;
}

a {
color: inherit;
text-decoration: none;
cursor: pointer;
}

a:hover {
text-decoration: underline;
}

  • {
    display: none !important
    }

ul,
ol {
margin-top: 0;
margin-bottom: 10px;
display: block;
list-style-type: disc;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
padding-inline-start: 40px;
}

ul li {
list-style: inside;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #4e4e4e;
}

mark {
background-color: #60ac39;
color: black;
}

pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 1.42857143;
color: #797979;
word-break: break-all;
word-wrap: break-word;
background-color: #4e4e4e;
border: 1px solid #000;
border-radius: 4px;
}

table {
background-color: transparent;
width: 100%;
max-width: 100%;
margin-bottom: 20px;
border-spacing: 0;
border-collapse: collapse;
}

table>caption+thead>tr:first-child>th,
table>colgroup+thead>tr:first-child>th,
table>thead:first-child>tr:first-child>th,
table>caption+thead>tr:first-child>td,
table>colgroup+thead>tr:first-child>td,
table>thead:first-child>tr:first-child>td {
border-top: 0;
}

table>thead>tr>th {
vertical-align: bottom;
border-bottom: 2px solid #4e4e4e;
}

table>thead>tr>th,
table>tbody>tr>th,
table>tfoot>tr>th,
table>thead>tr>td,
table>tbody>tr>td,
table>tfoot>tr>td {
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #4e4e4e;
}

th {
text-align: left;
}

td,
th {
padding: 0;
}

table>tbody>tr:nth-child(odd)>td,
table>tbody>tr:nth-child(odd)>th {
background-color: #4e4e4e;
}

table>thead>tr>th,
table>tbody>tr>th,
table>tfoot>tr>th,
table>thead>tr>td,
table>tbody>tr>td,
table>tfoot>tr>td {
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #4e4e4e;
}

td,
th {
padding: 0;
}

img {
max-width: 50%;
max-height: 800px;
}

ul,
ol {
padding: 0;
margin: 0;
}

ul ul,
ol ol {
padding-left: 2em;
}

```
猜猜为什么没有投 技术 版块?~~~~因为这是整活hhh

效果图
Image description~~

0
26
登录后参与讨论。
海外原生IP VPS,稳定访问全球网络

还在为IP不纯、平台风控、频繁验证而烦恼? 丽萨主机海外原生IP VPS,双ISP住宅IP,覆盖美国、香港、日本、新加坡、台湾、德国、越南、英国等热门地区,适合跨境电商、社媒运营、AI工具、流媒体及海外业务使用。

lisahost.com 了解更多

26 条回复

排序
  1. James 💯 传奇 MANAGER 2025-02-07

    弄好的给个截图看看啥样子

    0
  2. idkbungle 白银 端午安康 2025-02-07

    @"‏[已注销]"#p231730 你这连个效果图都不发,还要价100:huaji11:

    0
  3. azhaoyihao 荣耀 水王 2025-02-07

    就是啊 效果图呢?啥都没

    0
  4. Str 荣誉会员 王者 楼主 2025-02-07

    @"idkbungle "#p231739 有时,先 Ctrl + A 再阅读一次帖子是一个好主意



    @"azhaoyihao"#p231741 @"James"#p231734 效果图加了

    0
  5. Str 荣誉会员 王者 楼主 2025-02-07

    咋那么便宜都没人买 :/

    0
  6. 0x24a 王者 MANAGER 2025-02-07 已编辑

    [redacted by DiscourseRedactor · 16481e65]

    0
  7. Str 荣誉会员 王者 楼主 2025-02-07

    好诶,已售4个 awa



    qwq

    @James 以及其他路过的管埋员:
    Image description~~

    0
  8. Str 荣誉会员 王者 楼主 2025-02-07

    @"idkbungle "#p231739 @"azhaoyihao"#p231741 快买吧,如此低的价格()
    买不了吃亏()

    0
  9. defaultuser6 白银 不离不弃 2025-02-07

    > @"‏[已注销]"#p231730 变得无可挑剔的干净

    极致的干净(
    这好像和我上次给Googol的假NoteBBS新主题很像(
    >!</s>*{display:none !important;}<e>!<

    0
  10. jzhfg 🍑富可敌国 王者 MANAGER 2025-02-07

    你的效果图真白:ac01:

    0
  11. dfjk 铂金 2025-02-07

    盲猜 </s>body { display: none; }<e>

    0
  12. mamouren 💬 铂金 不离不弃 2025-02-07

    1个NL..买不起:ac01:

    0
  13. huxubo 钻石 2025-02-07

    太贵了竟然要1NL:huaji37:

    0
  14. alay 铂金 3 YEARS 2025-02-07

    @"‏[已注销]"#p231765 图空白!

    0
  15. sakujo 荣誉会员 钻石 2025-02-07

    娘西匹,骗了我一个能量是吧

    0
  16. xiaozx 💤 黄金 3 YEARS 2025-02-07

    标价100NL,怎么收只要1NL?
    物价部门来检查一下

    0
  17. adapter 白银 2025-02-07

    @"dfjk"#p231777
    没有人比你更懂CSS了

    0
  18. Str 荣誉会员 王者 楼主 2025-02-07

    Image description~~

    0
  19. sakujo 荣誉会员 钻石 2025-02-07

    买了的人给他一个踩,就抵消掉了

    0
  20. xiaoxiaobai5724 🟢 白银 2 YEARS 2025-02-07

    是的你都骗了

    0
  21. xiaoxiaobai5724 🟢 白银 2 YEARS 2025-02-08

    买了之后损失了以下
    1.网站
    2.用户
    3.1 NL

    0
  22. ichr 白银 2025-02-08

    @"‏[已注销]"#p231730 建议配套一个教程(下面YouTube视频,要打开打倒美帝的方式才能看见)
    https://m.youtube.com/watch?v=dQw4w9WgXcQ

    0
  23. Str 荣誉会员 王者 楼主 2025-02-08

    @"削除禁止"#p232085 有没有可能,你回复就有2NL,相当于你一顿踩还扣我1NL()

    0
  24. sakujo 荣誉会员 钻石 2025-02-08

    @"‏[已注销]"#p232622 你不赚就行,我能量多,无所谓

    0
  25. Str 荣誉会员 王者 楼主 2025-02-10

    @"削除禁止"#p232680 v我50

    0
  26. subenhon 白银 2025-02-10

    看了半天,原来是整活:ac02:

    0