v2ex上链接为什么不设计成短链,极端情况下原链接非常难看

2013-06-09 18:41:52 +08:00
 sunnist
如下图,看的非常别扭
http://img1.ph.126.net/9MTreZb3e9R9LeFjIP31-A==/1955969613262497484.jpg
4724 次点击
所在节点    设计
37 条回复
LokiSharp
2013-06-09 21:29:36 +08:00
我觉得短链更加别扭
cegle
2013-06-09 22:52:08 +08:00
短链别扭,还是原链直观,放心
恩,就这样
xmbaozi
2013-06-09 23:58:04 +08:00
同样不喜欢短链
根据以上楼层,lz是少数人。。
xatest
2013-06-10 00:07:28 +08:00
短链一旦失效,通向原链的路就堵死了,这是单点风险〜
lyric
2013-06-10 00:13:29 +08:00
@sunnist 图片打不开
taresky
2013-06-10 00:21:11 +08:00
谁要非得打开后才知道是什么啊……麻烦
Kaiyuan
2013-06-10 04:46:05 +08:00
默认时候只显示 URL 的部分, hover 时候再显示完整 URL,这样会不会好些?
sunnist
2013-06-10 07:20:13 +08:00
@xmbaozi 只是单纯受不了链接太长太多造成的页面不干净:P
sunnist
2013-06-10 07:22:14 +08:00
@lyric 一楼是图片啊 我这里可以看见,网络问题吧。
sunnist
2013-06-10 07:23:52 +08:00
@Kaiyuan 现在微博是这么处理的,twitter我没注意看。
weiceng
2013-06-10 11:04:23 +08:00
如果有强迫症,也可以自己短链嘛
myang
2013-06-10 12:58:28 +08:00
短链不是一般的难看啊。这个莫非和网龄有关……
Kaiyuan
2013-06-10 13:34:40 +08:00
@sunnist Twitter 是显示原始 URL 的部分,然后 a 标签加上一个 title 显示完整连接。
类似这种效果

<a href="http://img1.ph.126.net/9MTreZb3e9R9LeFjIP31-A==/1955969613262497484.jpg" rel="nofollow noopener" title="http://img1.ph.126.net/9MTreZb3e9R9LeFjIP31-A==/1955969613262497484.jpg">http://img1.ph.126.net/9MTreZb3e9R9LeFjIP31-A==/1955969613262497484.jpg</a>
<style>
#Main .topic_content a {
max-width: 120px;
text-decoration: none;
outline:none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
}
</style>
Kaiyuan
2013-06-10 13:44:39 +08:00
其实可以在设置里面自定义 css 添加下面代码。
#Main .topic_content a, .reply_content a {
max-width: 240px;
text-decoration: none;
outline: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
}
这样连接就会自动缩短,鼠标停留在连接时候浏览器底部状态栏会显示完整 URL。
LokiSharp
2013-06-10 16:16:07 +08:00
@wywh 我很好奇这个域名多少钱。。。
Kaiyuan
2013-06-10 16:19:05 +08:00
选择器改成
#Main .topic_content a[rel="nofollow noopener"], .reply_content a[rel="nofollow noopener"]
这样就不会把图片也缩小了。
aurorax
2013-06-11 15:22:23 +08:00
@dndx 同意~

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/71810

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX