V2EX 自定义 CSS

2015-02-14 23:36:28 +08:00
 lingoys

部分代码来源: http://www.v2ex.com/t/168103
第一次发帖好紧张 [
可能好多地方疏忽了,或不好看欢迎拍砖。

Well 代码:
```css
:root, input, textarea, button {
-webkit-font-smoothing: antialiased;
}

html, body { height: 100%; }

body {
background: url(https://unsplash.it/1600/900?random) #eee no-repeat fixed center;
background-size: cover;
font: 400 18px/1.62 "Georgia", "Xin Gothic", "Hiragino Sans GB", "Droid Sans Fallback", "Microsoft YaHei", sans-serif
}

#Top {
position: fixed;
top: 0;
left: 0;
width: 150px;
height: 100%;
box-sizing: border-box;
padding: 10px 20px;
background: rgba(255, 255, 255, .96);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.34);
}

#Top .content {
width: 100%;
margin: 0;
}

#Top .content table {
display: block;
width: 100%;
}

#Top .content table tbody,
#Top .content table tbody tr,
#Top .content table tbody tr td,
#Top .content table tbody tr td a {
display: block;
}

#Top .content table tbody tr td a {
line-height: 1.2;
}

#Top .content table tbody tr td {
width: 100%;
text-align: left;
height: 30px;
}

#Top .content table tbody tr td[align=right] a:first-child {
margin-top: 40px;
}

#Search > form > div {
margin: 20px -20px;
width: 150px!important;
height: 30px!important;
background: transparent!important;
transition: .3s ease;
-webkit-transition: .3s ease;
}

#Search > form > div:hover {
background: #eee;
}

#Search > form > div > input {
padding: 2px 20px;
width: 100%;
margin: 0;
height: 30px;
border: 1px solid #E7E7E7;
border-left: 0;
border-right: 0;
box-sizing: border-box;
}

#Wrapper {
margin-top: -2px!important;
background: transparent!important;
}

#Wrapper > .content {
width: 100%!important;
padding-left: 170px!important;
padding-right: 20px!important;
box-sizing: border-box;
}

#Main {
margin-right: 340px;
margin-left: 50px;
}

.box {
color: #222!important;
background: rgba(255, 255, 255, .97)!important;
box-shadow: 1px 1px 3px rgba(0, 0, 0, .14)!important;
border-radius: 0!important;
border-bottom-color: transparent!important;
}

.cell {
border-color: transparent!important;
}

.cell table tr td:nth-child(3) a[href="/new"] {
    padding: 7px 20px;
    background: #f2f2f2;
    border-radius: 20px;
    margin: 0 78px 0 0;
    float: right;
    margin-bottom: 20px;
}

.cell table tr td:nth-child(3) a[href="/new"]:hover {
background: #fff;
}

.fade {
color: #ababab!important;
}

.item_node {
background: #fdfdfd;
}

.item_node:hover {
background: #fff;
}

.topic_content, .reply_content {
color: #222!important;
}

img.avatar {
border-radius: 50%;
}

.topic_buttons {
background: #eee;
padding: 10px 8px; 
}

a.balance_area:link, a.balance_area:visited, .balance_area {
background: #eee;
}

.mll {
width: 100%;
box-sizing: border-box;
box-shadow: none;
border-radius: 0;
}

.mll, .sll, .mle {
background-color:#fff!important ;
border-color: #EEEEEE!important;
}

.normal.button {
background: #eee!important;
}

.cell, .header {
border-color: #eee!important;
}

.dock_area {
background: #edf3f5!important;
}

#Rightbar {
margin-right: 50px;
}

#Rightbar div:nth-child(2) .cell:first-child table:nth-child(1) tr td:nth-child(1) {
    text-align:center;
}
#Rightbar div:nth-child(2) .cell:first-child table:nth-child(1) tr td:nth-child(2),
#Rightbar div:nth-child(2) .cell:first-child table:nth-child(1) tr td:nth-child(3),
.sep20, img[src*="flat_compose.png"] {
    display:none;
}
#Rightbar div:nth-child(2) .cell:first-child table:nth-child(1) tr td:nth-child(1) img.avatar {
    width: 80px;
    height: 80px;
    max-width: 80px !important; 
    max-height: 80px !important;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    margin-top: 15px;
}
#Rightbar div:nth-child(2) .cell:first-child table:nth-child(3) {
    padding-bottom: 15px;
    padding-top: 15px;
}
#Rightbar .box div:nth-child(1) {
    border-bottom:0px;
}

#Bottom {
 position: absolute;
 z-index: 999;
width: 100%;
border: 0;
color: #fff;
margin-top: -2px;
text-shadow: 1px 1px 0 rgba(0, 0, 0, .5);
box-shadow: -1px -1px 3px rgba(0,0,0,.25);
background: url(https://unsplash.it/1600/900?random) #eee no-repeat fixed center;
background-size: cover;
}

#Bottom > .content {
padding: 0 20px;
width: 100%;
box-sizing: border-box;
background: rgba(255, 255, 255, .23);
}

#Bottom .fade,
#Bottom a{
color: #fff!important;
}

// 广告屏蔽 不推荐这么做 [
#topics_index+div+div, #Rightbar div+div+div+div {
display:none;
}
3517 次点击
所在节点    分享发现
13 条回复
mikangchan
2015-02-14 23:44:52 +08:00
赞赞赞
mikangchan
2015-02-14 23:44:59 +08:00
前排跪舔
Dukec
2015-02-14 23:45:02 +08:00
已用,点个赞。
yangkeao
2015-02-14 23:46:59 +08:00
Great,话说我做的时候真的不知道右边怎么处理比较好,你这样看起来很不错~~
mikangchan
2015-02-14 23:49:12 +08:00
代码:@import url("//mikangchan.b0.upaiyun.com/v2ex.css");
oldcai
2015-02-14 23:50:59 +08:00
呀,我上镜了O(∩_∩)O
楼层和回复的楼层一样。
lingoys
2015-02-14 23:51:05 +08:00
@yangkeao 啊,其实我也不知道这么做 [我也是随便乱上的。

@mikangchan @Dukec 感谢~
yangkeao
2015-02-15 00:10:43 +08:00
@lingoys 这么说是因为和我那个好像https://www.v2ex.com/t/170260

主要是右边,想到一块去了~~~那时我就不知道右边怎么处理,直接display:none了,搞的发帖和提醒都很不方便~~
lingoys
2015-02-15 00:48:58 +08:00
← 于是好冷,果然渣渣么
shuding
2015-02-15 00:56:57 +08:00
赞赞赞!
lingoys
2015-02-15 01:01:19 +08:00
@shuding 菊苣乃壕~
Mihuwa
2015-02-15 07:36:24 +08:00
支持。
sqbing
2015-02-15 09:28:18 +08:00
很不错,提点建议:
1. 左侧边栏过宽
2. 搜索栏加个放大镜更直观

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

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

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

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

© 2021 V2EX