css中响应式logo_CSS中的响应式前置标签

css中响应式logo

I’ve had some problems with responsiveness in a few posts, on my blog.

在我的博客上的几篇文章中,我在响应能力方面遇到了一些问题。

Turns out those posts I had problems on, they all had a snippet of code that went beyond the normal page width without a space.

原来我遇到问题的帖子,它们都有一小段代码,超出了正常页面宽度,没有空格。

For example

例如

cd /some/super/long/super/long/folder

or any other very long command.

或其他任何长命令。

Code snippets on my blog are all automatically added inside a code tag, and inside it into a pre tag.

我博客上的代码段都自动添加到了code标签中,然后又添加到了pre标签中。

By default the CSS white-space property on the pre tag is set to normal, and to fix this problem we set it to pre-wrap:

默认情况下, pre标签上CSS white-space属性设置为normal ,为了解决此问题,我们将其设置为pre-wrap

pre {
  white-space: pre-wrap;
}

When some words are too long they can still break the layout. To fix this, also add:

当某些单词太长时,它们仍然可以破坏布局。 要解决此问题,还添加:

pre {
  word-break: break-all;
}

翻译自: https://flaviocopes.com/responsive-pre-tags/

css中响应式logo

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值