@import 'elements'; @colorBg1: #F7F4F2; @colorBg2: #ede9e6; @colorBlueLight: #357e8f; @colorBlueMid: #75d1c5; @colorBlueDark: #142940; @colorRedDark: #B91122; @colorRedLight: #cf3050; body{ font: 400 16px/1.7em Helvetica, "微軟正黑體", Microsoft JhengHei; color:#222; background:@colorBg2; .container{ width: 1000px; margin:0 auto; padding:15px 20px; position:relative; } a{ .transition(0.4s); color:@colorBlueLight; &:hover{ color:@colorBlueMid; .transition(0.4s); } } div,xmp,a,span,header,footer,nav,ul,ol,li,iframe{ .box-sizing(); } ::selection { background: #F05924; color: #fff; } ::-moz-selection { background: #F05924; color: #fff; } } /*-----------------------------------------------------------header*/ header{ .gradient(@colorBlueLight, @colorBlueLight, @colorBlueMid); .container{ width: 100%; min-width: 1000px; text-align: center; h1{ font-size:2.8em; text-align: center; color:#FFF; margin:40px 0; } nav{ display: inline-block; ul{ list-style-type: none; text-align: center; white-space: nowrap; padding:0; li{ display:inline-block; a{ color:#FFF; border:1px solid #FFF; display:block; text-decoration: none; padding:4px 10px; margin:0 2px; &:hover{ background:rgba(255,255,255,.4); color:#FFF; } } } } } } } header.fixed{ height:206px; .container{ padding:6px; position:fixed; left:0; top:0; z-index:999; width:100%; background:rgba(53,126,143,.8); h1{ font:400 1.1em Helvetica, "微軟正黑體", Microsoft JhengHei;; margin:0 10px 0 0; display:inline; } nav{ ul{ margin:0; li{ a{ font-size:.8em; padding:1px 6px; margin:0 2px; } } } } } } /*-----------------------------------------------------------fixMenu*/ #fixMenu{ position:fixed; left:-210px; top:50%; margin-top:-247px; width:240px; .border-radius(8px,8px,0,0); background:@colorRedLight; color:#FFF; z-index: 999; cursor: pointer; &::before{ font-size:1em; width:20px; line-height:1.8em; content:"全部分類"; display: block; position: absolute; right:4px; top:40px; } &::after{ content:""; display:block; width:0;height:0; border-right: none; border-left: 12px solid #FFF; border-top: 8px solid transparent; border-bottom: 8px solid transparent; position: absolute; right:10px; top:15px; } &:hover{ background:@colorRedLight+#111; } ul{ list-style-type: none; background:rgba(53,126,143,.8); padding:0; margin:0; width:210px; li{ a{ display: block; padding: 5px 20px; color:#FFF; border-bottom:1px solid rgba(255,255,255,.4); text-decoration: none; &:hover{ background:@colorBlueMid; } } &:last-child a{ border-bottom:none; } } li.active{ a{ background:@colorBlueMid; } } } } #fixMenu.active{ background:rgba(53,126,143,.8); &::after{ border-right: 12px solid #FFF; border-left: none; } &:hover{ background:rgba(53,126,143,.6); } } /*-----------------------------------------------------------article*/ article{ padding:20px 0; border-bottom:1px dashed #333; h2{ font-size:2.4em; line-height: 1.2em; padding:12px 20px 12px 46px; position:relative; &::before{ content:""; display: block; width:100px; height:1px; border-bottom:1px solid #333; position:absolute; left:0; top:15px; .rotation(130deg); } i{ position:absolute; left:10px; top:-10px; font-size:1.5em; } } h3{ margin:50px 0 20px 0; padding:0 16px; font-size:1.3em; line-height: 2em; display:inline-block; border:2px solid #333; letter-spacing: 1px; position:relative; font-weight: normal; &::before{ content:""; display: block; width:80px; height:1px; border-bottom:1px solid #333; position:absolute; left:-80px; top:19px; } } h4{ margin:15px 0 0 0; border-top:1px solid #333; border-bottom:1px solid #333; display: inline-block; padding:0 12px; &::after{ content:" \2794"; } } /*xmp{ background:#333; color:#FFF; padding:0px 20px 1.2em 20px; margin-bottom: 0; display: block; line-height: 1.4em; font-family:monospace; .border-radius(4px,4px,4px,4px); .inner-shadow(0,2px,4px,0.4); font-size: .92em; white-space: pre-wrap; }*/ div.demo{ padding:0; position:relative; iframe{ background:#FFF; padding:0; width:100%; height: 200px; margin: -20px 0 0 0; border:1px solid #ACA5A0; } } div.explain{ padding:0 0 0 40px; color:@colorBlueDark; font-size:.95em; line-height: 1.5em; position:relative; &::before{ content:"\2712"; font-size:1.2em; display:inline-block; position:absolute; left:15px; top:0; } ul,ol{ padding-left: 20px; } } div.note{ font-weight: bold; color:@colorRedDark; &::before{ content:"\2731"; font-weight: 400; margin-right:4px; position:static; font-size:1em; } } span.tag{ background: @colorRedLight; color: #EEE; font-weight: normal; font-size:.9em; padding:4px 8px; } strong{ color: @colorBlueDark; } ul,ol{ margin-top:0; } em{ font-style: normal; color:@colorRedLight; font-weight:bold; } pre{ border:1px dashed #333; border-left:8px solid #333; overflow: visible; padding:15px 20px; white-space:normal; font: 400 .95em/1.7em Helvetica, "微軟正黑體", Microsoft JhengHei; /*.drop-shadow(1px,1px,6px,.2);*/ h5{ font-size: 1.4em; margin:6px 0; color: #333; } xmp{ background:@colorBg1; color:#333; .inner-shadow(0,2px,4px,0); } } q{ display:block; margin:20px 0; background:rgba(255,255,255,.7); .border-radius(6px,6px,6px,6px); padding:20px 30px; position:relative; &::before{ content:"\275D"; font-size:2em; color:@colorBg2; position: absolute; left:5px; top:5px; } &::after{ content:"\275E"; font-size:2em; color:@colorBg2; position: absolute; right:5px; bottom:-5px; } } mark{ background:@colorRedLight; color: #FFF; font-weight:bold; font-size:.9em; padding:2px 6px; } b{ border-bottom: 1px solid #000; } code{ color:@colorBlueLight; background:#ddd; padding: 2px 6px; } .syntaxhighlighter{ padding: 20px 10px 20px 0; } span.link{ font-weight: normal; &::before{ content:"\2794"; text-decoration: none!important; margin:0 5px 0 5px; color:#333; } } table{ border-collapse: separate; border-spacing: 2px; min-width:240px; th{ background:#333; color:#FFF; padding: 0 10px; } td{ background:@colorBg1; padding: 0 10px; } } } /*-----------------------------------------------------------footer*/ footer{ background:#333; color:#FFF; font-size:.9em; p{ text-align: right; } } /*-----------------------------------------------------------top*/ #top{ display:block; position:fixed; right:20px; bottom:20px; background:@colorRedLight; .border-radius(4px,4px,4px,4px); .drop-shadow(0, 1px, 2px,0.1); width:40px; height:40px; &::before{ content:""; display:block; margin:0 auto; width:0; height:0; border-bottom:12px solid #FFF; border-left:12px solid transparent; border-right:12px solid transparent; margin-top:8px; .transition(0.4s); } &::after{ content:""; display:block; margin:0 auto; background:#FFF; width:10px; height:13px; } &:hover{ background:@colorRedDark; &::before{ margin-top:6px; .transition(0.4s); } } } #tag { position: fixed; right: 10px; bottom: 10px; width: 50px; height: 50px; -webkit-transition: all ease .3s; -moz-transition: all ease .3s; -o-transition: all ease .3s; transition: all ease .3s; background: rgba(239, 0, 0, 1); background: -moz-linear-gradient(45deg, rgba(239, 0, 0, 1) 0%, rgba(14, 148, 192, 1) 100%); background: -webkit-gradient(left bottom, right top, color-stop(0%, rgba(239, 0, 0, 1)), color-stop(100%, rgba(14, 148, 192, 1))); background: -webkit-linear-gradient(45deg, rgba(239, 0, 0, 1) 0%, rgba(14, 148, 192, 1) 100%); background: -o-linear-gradient(45deg, rgba(239, 0, 0, 1) 0%, rgba(14, 148, 192, 1) 100%); background: -ms-linear-gradient(45deg, rgba(239, 0, 0, 1) 0%, rgba(14, 148, 192, 1) 100%); background: linear-gradient(45deg, rgba(239, 0, 0, 1) 0%, rgba(14, 148, 192, 1) 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ef0000', endColorstr='#0e94c0', GradientType=1); display: block; z-index: 10000; border-radius: 100%; } #tag span { display: block; width: 100%; height: 100%; background: url(http://test.domojyun.net/MEMO/tag.png) center center/80% auto no-repeat; text-indent: -9999px; } #tag:hover { margin-bottom: 4px; }