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

代码区的水平滚动条鼠标拖拽不了 #34

Closed
chunchengwei opened this issue Dec 5, 2018 · 9 comments
Closed

代码区的水平滚动条鼠标拖拽不了 #34

chunchengwei opened this issue Dec 5, 2018 · 9 comments

Comments

@chunchengwei
Copy link
Contributor

代码块,在手机显示上没有问题,但在电脑上显示时,用鼠标拖拽水平滚动条拖拽不了。

@blinkfox
Copy link
Owner

blinkfox commented Dec 5, 2018

@chunchengwei 并没有发现你说的问题呢

@chunchengwei
Copy link
Contributor Author

chunchengwei commented Dec 5, 2018

@blinkfox 在谷歌浏览器下没问题,但是在safari下就水平滚动条就拖拽不了。但是可以使用触控板双指水平移动代码块,类似于在手机上用手势拖拽代码块。

@blinkfox
Copy link
Owner

blinkfox commented Dec 5, 2018

safari下的一个效果,它本来就是这样的。

@chunchengwei
Copy link
Contributor Author

safari下的一个效果,它本来就是这样的。

可以同时也添加水平拖拽的功能么?平时用鼠标,不能拖拽很不方便。

@blinkfox
Copy link
Owner

blinkfox commented Dec 5, 2018

这个程序没啥问题,是safari浏览器的特殊功能,你可以去Mac设置项里面修改成“始终显示滚动条”的功能。具体方法你可以用搜索引擎搜一下。

@chunchengwei
Copy link
Contributor Author

image

可以显示出来滚动条,但是拖拽不了。而且已经打开了始终显示滚动条

@blinkfox
Copy link
Owner

blinkfox commented Dec 5, 2018

那就没法了,safari这样搞的吧,那只能让代码折行,不出现滚动条就行了,你到matery.css文件中约124行的样式里面,加上一行white-space: pre-wrap !important;的折行样式即可,代码如下:

code[class*="language-"],
pre[class*="language-"] {
    color: #e8eaf6;
    white-space: pre-wrap !important;
}

@chunchengwei
Copy link
Contributor Author

好的👌

@blinkfox
Copy link
Owner

blinkfox commented Dec 6, 2018

这个用折行的方式解决了,我就把这个issue关掉了哈。

@blinkfox blinkfox closed this as completed Dec 6, 2018
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

No branches or pull requests

2 participants