Dedecms内容页英文及代码不自动换行

2014年7月30日21:55:58网站建设1 646

如果你在使用Dedecms时候,发布的带有英文或者代码的文章撑破网站架构,显得极其不美观,你可以参看下面的教程。文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

首先需要找到织梦默认的css:文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

默认为templets\default\style\page.css文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

在.viewbox .content{下增加强制英文和数字长字符自动换行CSS代码即可,完整代码如下: word-wrap:break-word;
word-break:break-all;文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

结果如下:文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

.viewbox .content文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

{文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

font-size:14px;文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

padding:12px 16px;文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

line-height:25px;文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

color:#333;文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

word-wrap:break-word;文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

word-break:break-all;文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

}文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

word-wrap语法介绍:文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

  word-wrap 属性允许长单词或 URL 地址换行到下一行。文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

word-wrap: normal|break-word;文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

word-wrap描述:文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

  normal 只在允许的断字点换行(浏览器保持默认处理)。文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

break-word 在长单词或 URL 地址内部进行换行。文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

word-break语法介绍:文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

  word-break 属性规定自动换行的处理方法。文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

word-break: normal|break-all|keep-all;文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

word-wrap描述:文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

  normal 使用浏览器默认的换行规则。文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

break-all 允许在单词内换行。文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

keep-all 只能在半角空格或连字符处换行。文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

 文章源自堕落的鱼-https://www.duoluodeyu.com/854.html

常用正则表达式汇总 网站建设

常用正则表达式汇总

很多不太懂正则的朋友,在遇到需要用正则校验数据时,往往是在网上去找很久,结果找来的还是不很符合要求。所以我最近把开发中常用的一些正则表达式整理了一下,在这里分享一下。给自己留个底,也给朋友们做个参考。...
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定

评论:1   其中:访客  1   博主  0
    • 湿式球磨机
      湿式球磨机 1

      每天睡觉以前,我都会把您的帖子再三拜读,拜读。 希望这样的好贴多些,再多些!!!