Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

给pre code标签 添加单行内容过长折行处理 #13

Merged
merged 1 commit into from
Sep 22, 2012

Conversation

voodeng
Copy link
Contributor

@voodeng voodeng commented Sep 21, 2012

rt,两个标签里的文字过长也能进行折行

rt,两个标签里的文字过长也能进行折行了。
@sofish
Copy link
Owner

sofish commented Sep 22, 2012

多谢

sofish added a commit that referenced this pull request Sep 22, 2012
给pre code标签 添加单行内容过长折行处理
@sofish sofish merged commit d666941 into sofish:master Sep 22, 2012
@xcatliu
Copy link
Contributor

xcatliu commented Aug 30, 2014

代码片段单行过长时,一般是不要折行的,而是设置

pre code {
  display: block;
  overflow-x: auto;
}

使其有横向滚动条

参考 github 中的代码显示:

function a_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_long_function() {
  return true;
}

@undoZen
Copy link

undoZen commented Aug 31, 2014

赞同 @xcatliu

sofish added a commit that referenced this pull request Aug 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants