update style for mobile

This commit is contained in:
OttoMao 2015-08-06 15:36:05 +08:00
parent 58b35a70ea
commit bec5458e45
3 changed files with 336 additions and 141 deletions

View File

@ -63,6 +63,12 @@ body {
display: inline-block;
transition: 0.3s;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.wrapper .actionBtn {
font-size: 20px;
padding: 10px 20px;
}
}
.wrapper .actionBtn:hover {
background: #326eeb;
color: #f9f9f9;
@ -71,6 +77,11 @@ body {
width: 100%;
min-width: 890px;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.wrapper > div {
min-width: 100%;
}
}
.brief {
height: 300px;
text-align: center;
@ -81,6 +92,7 @@ body {
.brief .slogan {
font-size: 16px;
color: #5a5a5a;
padding: 0 20px;
}
.feature {
background: #dedede;
@ -89,6 +101,11 @@ body {
width: 1200px;
margin: 0 auto;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.feature .featureContent {
width: 100%;
}
}
.feature .featureContent .item {
padding: 30px 0 20px;
width: 280px;
@ -125,6 +142,25 @@ body {
font-size: 14px;
line-height: 20px;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.feature .featureContent .item {
padding: 20px 0;
float: none;
margin: 0 auto;
font-size: 24px;
}
.feature .featureContent .iconWrapper {
font-size: 25px;
line-height: 25px;
}
.feature .featureContent .iconWrapper .bigger {
font-size: 30px;
}
.feature .featureContent h4 {
font-size: 16px;
margin: 4px;
}
}
.quickstart {
background: #f9f9f9;
}
@ -136,6 +172,11 @@ body {
right: 0;
bottom: 0;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.quickstart .screenshot {
display: none;
}
}
.quickstart code.simpleBash {
font-family: monospace;
font-weight: bold;
@ -146,9 +187,19 @@ body {
width: 890px;
margin: 0 auto;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.listSection .listContent {
width: 100%;
}
}
.listSection ul {
margin: 0 auto;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.listSection ul {
padding: 0 20px 0 30px;
}
}
.listSection li {
color: #5a5a5a;
font-size: 16px;
@ -161,6 +212,11 @@ body {
width: 890px;
margin: 0 auto;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.sample .sampleContent {
width: 100%;
}
}
.sample .item {
margin: 10px;
}
@ -169,6 +225,11 @@ body {
margin: 0px 10px;
color: #5a5a5a;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.sample .itemTitle {
margin: 0;
}
}
.sample .figure {
vertical-align: top;
}
@ -177,9 +238,22 @@ body {
display: inline-block;
vertical-align: top;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.sample pre {
width: 100%;
}
}
.sample code {
width: 495px;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.sample code {
width: 100%;
margin: 0 auto;
word-wrap: break-word;
padding: 0;
}
}
.sample hr {
border: none;
border-top: 1px solid #777777;
@ -201,6 +275,11 @@ body {
position: relative;
padding: 120px 0;
}
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) and (-webkit-min-device-pixel-ratio: 2) {
.learnMore {
padding: 70px 0;
}
}
.learnMore h4.subtitle {
padding: 0;
margin-bottom: 30px;

View File

@ -3,6 +3,8 @@
<title>AnyProxy</title>
<link rel="stylesheet" type="text/css" href="./index.css">
<link rel="shortcut icon" type="image/png" href="/favico.png?t=2" />
<meta name="description" content="AnyProxy - 开放式的HTTP/HTTPS代理你可以灵活控制各种网络数据">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
</head>
<body>
@ -56,13 +58,13 @@
<div class="quickstart listSection">
<div class="quickstartContent listContent">
<h4 class="subtitle">安装</h4>
<h4 class="subtitle" id="install">安装</h4>
<ul>
<li>安装 <a href="http://nodejs.org/" target="_blank">Node.js</a> &gt;= v0.12</li>
<li><code class="simpleBash">npm install -g anyproxy</code>, 可能需要<code class="simpleBash">sudo</code></li>
<li><a href="https://github.com/alibaba/anyproxy#quick-start" target="_blank">More&gt;&gt;</a></li>
</ul>
<h4 class="subtitle">使用</h4>
<h4 class="subtitle" id="quickstart">使用</h4>
<ul>
<li>运行&nbsp;&nbsp;<code class="simpleBash">anyproxy</code></li>
<li>把浏览器http代理指向 127.0.0.1:8001</li>
@ -76,7 +78,7 @@
<div class="sample">
<div class="sampleContent">
<h4 class="subtitle">规则文件(rule)样例</h4>
<h4 class="subtitle" id="sample ">规则文件(rule)样例</h4>
<div class="item">
<h5 class="itemTitle">在HTML响应末尾加上"hello world"</h5>
@ -193,13 +195,13 @@ module.exports = {
<div class="readMore listSection">
<div class="listContent">
<h4 class="subtitle">其他特性</h4>
<h4 class="subtitle" id="otherfeature">其他特性</h4>
<ul>
<li>Map LocalLog Filter等常规功能</li>
<li><a href="https://github.com/alibaba/anyproxy#throttling">低网速网速模拟</a>调试应用在2G/3G下的表现</li>
<li><a href="https://github.com/alibaba/anyproxy#work-as-a-module-for-nodejs" target="_blank">把AnyProxy作为npm模块</a>,基于它做二次开发</li>
</ul>
<h4 class="subtitle">相关阅读</h4>
<h4 class="subtitle" id="ref">相关阅读</h4>
<ul>
<li><a href="https://github.com/alibaba/anyproxy/wiki/%E4%BB%A3%E7%90%86%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%9A%84%E6%96%B0%E8%BD%AE%E5%AD%90%EF%BC%9Aanyproxy" target="_blank">代理服务器的新轮子</a>介绍AnyProxy的设计初衷以及它的开放式设计可以解决什么问题。</li>
<li><a href="http://www.infoq.com/cn/presentations/alipay-hybrid-application-quality-assurance-practice" target="_blank">QCon - 《支付宝hybrid应用质量保证实践》</a>涉及到AnyProxy在测试工程中的应用(By 陈晔)</li>
@ -209,7 +211,7 @@ module.exports = {
<div class="learnMore listSection">
<div class="btnWrapper">
<h4 class="subtitle white">Read More</h4>
<h4 class="subtitle white" id="readmore">Read More</h4>
<a class="actionBtn actionBtnWhite" href="https://github.com/alibaba/anyproxy" target="_blank">https://github.com/alibaba/anyproxy</a>
</div>
</div>

View File

@ -8,6 +8,9 @@
@wideContent : 1200px;
@normalContent : 890px;
@wideContentMobile : 100%;
@normalContentMobile : 100%;
@font-face {
font-family: 'iconfont';
src: url('//at.alicdn.com/t/font_1438330832_106274.eot'); /* IE9*/
@ -85,6 +88,14 @@ body{
border-radius: 30px;
display: inline-block;
transition:0.3s;
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
font-size:20px;
padding: 10px 20px;
}
}
.actionBtn:hover{
@ -96,8 +107,17 @@ body{
.wrapper>div{
width: 100%;
min-width: @normalContent;
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
min-width: @normalContentMobile;
}
}
.brief{
height: 300px;
text-align: center;
@ -108,6 +128,7 @@ body{
.slogan{
font-size: 16px;
color: @textDark;
padding: 0 20px;
}
}
@ -115,6 +136,13 @@ body{
background: @darkGray;
.featureContent{
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
width: @wideContentMobile;
}
width: @wideContent;
margin: 0 auto;
@ -158,6 +186,34 @@ body{
font-size: 14px;
line-height: 20px;
}
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
.item{
padding: 20px 0;
float :none;
margin : 0 auto;
font-size : 24px;
}
.iconWrapper{
font-size: 25px;
line-height: 25px;
}
.iconWrapper .bigger{
font-size: 30px;
}
h4{
font-size: 16px;
margin: 4px;
}
}
}
}
@ -172,6 +228,13 @@ body{
position: absolute;
right: 0;
bottom: 0;
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
display : none;
}
}
code.simpleBash{
@ -184,12 +247,27 @@ body{
.listSection{
.listContent{
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
width: @normalContentMobile;
}
width: @normalContent;
margin: 0 auto;
}
ul{
margin: 0 auto;
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
padding: 0 20px 0 30px;
}
}
li{
@ -202,6 +280,14 @@ body{
.sample{
background: @gray;
.sampleContent{
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
width: @normalContentMobile;
}
width: @normalContent;
margin: 0 auto;
}
@ -215,6 +301,13 @@ body{
font-size: 16px;
margin: 0px 10px;
color: @textDark;
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
margin :0;
}
}
.figure{
@ -225,10 +318,25 @@ body{
margin: 0;
display: inline-block;
vertical-align: top;
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
width: 100%;
}
}
code{
width: 495px;
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
width:100%;
margin: 0 auto;
word-wrap: break-word;
padding: 0;
}
}
hr{
@ -255,6 +363,12 @@ body{
text-align: center;
position: relative;
padding: 120px 0;
@media only screen
and (min-device-width: 320px)
and (max-device-width: 480px)
and (-webkit-min-device-pixel-ratio: 2){
padding: 70px 0;
}
h4.subtitle{
padding: 0;