Skip to content

Commit

Permalink
Updated cube
Browse files Browse the repository at this point in the history
  • Loading branch information
cyjake committed Feb 18, 2014
1 parent 7654061 commit 99e7832
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 4 additions & 6 deletions assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -904,19 +904,19 @@ ol.type-toc,
.type h6 {
padding-left: 1em;
position: relative;
-webkit-background-clip:padding-box;
/* -webkit-background-clip:padding-box;
-moz-background-clip:padding;
background-clip:padding-box;
border-top: 80px solid transparent;
margin-top: -70px;
margin-top: -70px; */
}

/**
* 防止遮挡住上面的内容,导致无法选中
* 每个 z-index 递减,防止 h2+h3 这样的结构导致 h2 无法选中
*/

.type h2 {
/*.type h2 {
z-index: -2;
}
Expand All @@ -934,9 +934,7 @@ ol.type-toc,
.type h6 {
z-index: -6;
}

/* 防止标题上边距导致 */
}*/
.type {
position: relative;
z-index: 1;
Expand Down
1 change: 1 addition & 0 deletions assets/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ KISSY.use('brix/app,node', function(S, app, Node) {

S.all('article').all('h2,h3,h4,h5,h6').each(function(heading) {
var id = heading.attr('id')
heading.removeAttr('id')
heading.prepend('<a name="' + id + '" class="anchor"></a>')
heading.prepend('<a class="anchor-link" href="#' + id + '"></a>')
})
Expand Down

0 comments on commit 99e7832

Please sign in to comment.