Android APK反编译 apktool使用教程
2017年棋牌游戏突然就火了,正所谓春江水暖鸭先知本猿处在软件行业中就能清晰的感受到市场的变化,最近老家那边也是玩的风生水起,于是最近闲暇时光想到反编译下这些棋牌软件,看看代码实现的思路
(注:反编译不是让各位开发者去对一个应用破解搞重装什么的,主要目的是为了促进开发者学习,借鉴好的代码,提升自我开发水平。)
工具介绍:
apktool作用:主要查看res文件下xml文件、AndroidManifest.xml和图片。(注意:如果直接解压.apk文件,xml文件打开全部是乱码)
dex2jar作用:将apk反编译成Java源码(classes.dex转化成jar文件)
jd-gui作用:用来查看APK中classes.dex转化成出的jar文件,即源码文件
2017年12月1日新版本apktool用法:
1.下载两个文件apktool.bat和apktool.jar(这个如果你下载的文件有版本号,比如apktool_2.3.0.jar,就要改名字为apktool.jar),这里我已经打包好了传到了我的CSDN(http://download.csdn.net/download/qq_36272276/10140306 ),直接下载就OK了;
2.然后把上面两个文件解压放到C:\Windows下面,放到这里是可以全局进行使用(我是windows系统,其他系统按照自己的来)如下图:
3.使用方法
把要解压的apk文件放在自己任意一个盘的目录下,在apk的目录下,按住shift+鼠标右键打开cmd黑窗口 如下图:
接下来输入官方给的命令
//当输入完这两个命令后
apktool d test.apk
apktool b test
//出现如下图一样的说明就反编译成功了,在他的同级目录下就多出了一个文件夹,里面就是反编译出来的源码,具体有啥我就不细说了哈,自己慢慢研究吧!
4.Apk反编译得到Java源代码
下载上述工具中的dex2jar(http://www.3jyy.cn/ziyuan/dex2jar-2.0.zip) 和 jd-gui(http://www.3jyy.cn/ziyuan/jd-gui-0.3.3.windows.zip) ,解压
将要反编译的APK后缀名改为.rar或则 .zip,并解压,得到其中的额classes.dex文件(它就是java文件编译再通过dx工具打包而成的),将获取到的classes.dex放到之前解压出来的工具dex2jar-2.0文件夹内,在命令行下定位到d2j-dex2jar.bat所在目录(现在这个目录增加了许多命令,一定要看清楚哦),输入
d2j-dex2jar.bat classes.dex
效果如下:说明就成功了 会看到同级目录下会生成一个classes_dex2jar.jar的文件,然后打开工具jd-gui文件夹里的jd-gui.exe,之后用该工具打开之前生成的classes_dex2jar.jar文件,便可以看到源码了,效果如下:
- 通过反编译,你可以获知该应用用到了什么第3方的库文件,它的代码是如何编写的等等。
然而,如果该APK进行了混淆处理,那么你看到的类文件名称以及里面的方法名称都会以a,b,c….之类的样式命名,所以你可以想找到你所想得知的界面代码可能会十分费劲,找到了代码可能看起来也会很费劲,可是一个大体的思路会获得,有了这个思路,你就可以自己去尝试了。
div.oembedall-githubrepos { border: 1px solid rgba(221, 221, 221, 1); border-radius: 4px; list-style-type: none; margin: 0 0 10px; padding: 8px 10px 0; font: 13.34px / 1.4 helvetica, arial, freesans, clean, sans-serif; width: 452px; background-color: rgba(255, 255, 255, 1) }
div.oembedall-githubrepos .oembedall-body { border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top: 1px solid rgba(238, 238, 238, 1); margin-left: -10px; margin-top: 8px; padding: 5px 10px; width: 100% }
div.oembedall-githubrepos h3 { font-size: 14px; margin: 0; padding-left: 18px; white-space: nowrap }
div.oembedall-githubrepos p.oembedall-description { color: rgba(68, 68, 68, 1); font-size: 12px; margin: 0 0 3px }
div.oembedall-githubrepos p.oembedall-updated-at { color: rgba(136, 136, 136, 1); font-size: 11px; margin: 0 }
div.oembedall-githubrepos ul.oembedall-repo-stats { border: none; float: right; font-size: 11px; font-weight: 700; padding-left: 15px; position: relative; z-index: 5; margin: 0 }
div.oembedall-githubrepos ul.oembedall-repo-stats li { border: none; color: rgba(102, 102, 102, 1); display: inline-block; list-style-type: none; margin: 0 !important }
div.oembedall-githubrepos ul.oembedall-repo-stats li a { background-color: rgba(0, 0, 0, 0); border-top: none; border-right: none; border-bottom: none; border-left: 1px solid rgba(221, 221, 221, 1); color: rgba(102, 102, 102, 1) !important; background-position: 5px -2px; background-repeat: no-repeat; display: inline-block; height: 21px; line-height: 21px; padding: 0 5px 0 23px }
div.oembedall-githubrepos ul.oembedall-repo-stats li:first-child a { border-left: 3px none; margin-right: -3px }
div.oembedall-githubrepos ul.oembedall-repo-stats li a:hover { background: 5px -27px no-repeat rgba(65, 131, 196, 1); color: rgba(255, 255, 255, 1) !important; text-decoration: none }
div.oembedall-githubrepos ul.oembedall-repo-stats li:first-child a:hover { border-bottom-left-radius: 3px; border-top-left-radius: 3px }
ul.oembedall-repo-stats li:last-child a:hover { border-bottom-right-radius: 3px; border-top-right-radius: 3px }
span.oembedall-closehide { background-color: rgba(170, 170, 170, 1); border-radius: 2px; cursor: pointer; margin-right: 3px }
div.oembedall-container { margin-top: 5px; text-align: left }
.oembedall-ljuser { font-weight: 700 }
.oembedall-ljuser img { vertical-align: bottom; border: 0; padding-right: 1px }
.oembedall-stoqembed { border-bottom: 1px dotted rgba(153, 153, 153, 1); float: left; overflow: hidden; width: 730px; line-height: 1; background: rgba(255, 255, 255, 1); color: rgba(0, 0, 0, 1); font-family: Arial, Liberation Sans, DejaVu Sans, sans-serif; font-size: 80%; text-align: left; margin: 0; padding: 0 }
.oembedall-stoqembed a { color: rgba(0, 119, 204, 1); text-decoration: none; margin: 0; padding: 0 }
.oembedall-stoqembed a:hover { text-decoration: underline }
.oembedall-stoqembed a:visited { color: rgba(74, 107, 130, 1) }
.oembedall-stoqembed h3 { font-family: Trebuchet MS, Liberation Sans, DejaVu Sans, sans-serif; font-size: 130%; font-weight: 700; margin: 0; padding: 0 }
.oembedall-stoqembed .oembedall-reputation-score { color: rgba(68, 68, 68, 1); font-size: 120%; font-weight: 700; margin-right: 2px }
.oembedall-stoqembed .oembedall-user-info { height: 35px; width: 185px }
.oembedall-stoqembed .oembedall-user-info .oembedall-user-gravatar32 { float: left; height: 32px; width: 32px }
.oembedall-stoqembed .oembedall-user-info .oembedall-user-details { float: left; margin-left: 5px; overflow: hidden; white-space: nowrap; width: 145px }
.oembedall-stoqembed .oembedall-question-hyperlink { font-weight: 700 }
.oembedall-stoqembed .oembedall-stats { background: rgba(238, 238, 238, 1); margin: 0 0 0 7px; padding: 4px 7px 6px; width: 58px }
.oembedall-stoqembed .oembedall-statscontainer { float: left; margin-right: 8px; width: 86px }
.oembedall-stoqembed .oembedall-votes { color: rgba(85, 85, 85, 1); padding: 0 0 7px; text-align: center }
.oembedall-stoqembed .oembedall-vote-count-post { font-size: 240%; color: rgba(128, 129, 133, 1); display: block; font-weight: 700 }
.oembedall-stoqembed .oembedall-views { color: rgba(153, 153, 153, 1); padding-top: 4px; text-align: center }
.oembedall-stoqembed .oembedall-status { margin-top: -3px; padding: 4px 0; text-align: center; background: rgba(117, 132, 92, 1); color: rgba(255, 255, 255, 1) }
.oembedall-stoqembed .oembedall-status strong { color: rgba(255, 255, 255, 1); display: block; font-size: 140% }
.oembedall-stoqembed .oembedall-summary { float: left; width: 635px }
.oembedall-stoqembed .oembedall-excerpt { line-height: 1.2; margin: 0; padding: 0 0 5px }
.oembedall-stoqembed .oembedall-tags { float: left; line-height: 18px }
.oembedall-stoqembed .oembedall-tags a:hover { text-decoration: none }
.oembedall-stoqembed .oembedall-post-tag { background-color: rgba(224, 234, 241, 1); border-bottom: 1px solid rgba(62, 109, 142, 1); border-right: 1px solid rgba(127, 159, 182, 1); color: rgba(62, 109, 142, 1); font-size: 90%; line-height: 2.4; margin: 2px 2px 2px 0; padding: 3px 4px; text-decoration: none; white-space: nowrap }
.oembedall-stoqembed .oembedall-post-tag:hover { background-color: rgba(62, 109, 142, 1); border-bottom: 1px solid rgba(55, 96, 125, 1); border-right: 1px solid rgba(55, 96, 125, 1); color: rgba(224, 234, 241, 1) }
.oembedall-stoqembed .oembedall-fr { float: right }
.oembedall-stoqembed .oembedall-statsarrow { background-image: url(“http://cdn.sstatic.net/stackoverflow/img/sprites.png?v=3”); background-repeat: no-repeat; overflow: hidden; background-position: 0 -435px; float: right; height: 13px; margin-top: 12px; width: 7px }
.oembedall-facebook1 { border: 1px solid rgba(26, 60, 108, 1); padding: 0; font: 13.34px / 1.4 verdana; width: 500px }
.oembedall-facebook2 { background-color: rgba(98, 122, 221, 1) }
.oembedall-facebook2 a { color: rgba(232, 232, 232, 1); text-decoration: none }
.oembedall-facebookBody { background-color: rgba(255, 255, 255, 1); vertical-align: top; padding: 5px }
.oembedall-facebookBody .contents { display: inline-block; width: 100% }
.oembedall-facebookBody div img { float: left; margin-right: 5px }
div.oembedall-lanyard { -webkit-box-shadow: none; -webkit-transition-delay: 0s; -webkit-transition-duration: .4000000059604645s; -webkit-transition-property: width; -webkit-transition-timing-function: cubic-bezier(0.42,0,.58,1); background-attachment: scroll; background-clip: border-box; background-color: rgba(0, 0, 0, 0); background-image: none; background-origin: padding-box; border-width: 0; box-shadow: none; color: rgba(17, 38, 68, 1); display: block; float: left; font-family: “Trebuchet MS”, Trebuchet, sans-serif; font-size: 16px; height: 253px; line-height: 19px; margin: 0; max-width: none; min-height: 0; outline: 0 rgba(17, 38, 68, 1); overflow-x: visible; overflow-y: visible; padding: 0; position: relative; text-align: left; vertical-align: baseline; width: 804px }
div.oembedall-lanyard .tagline { font-size: 1.5em }
div.oembedall-lanyard .wrapper { overflow: hidden; clear: both }
div.oembedall-lanyard .split { float: left; display: inline }
div.oembedall-lanyard .prominent-place .flag:active, div.oembedall-lanyard .prominent-place .flag:focus, div.oembedall-lanyard .prominent-place .flag:hover, div.oembedall-lanyard .prominent-place .flag:link, div.oembedall-lanyard .prominent-place .flag:visited { float: left; display: block; width: 48px; height: 48px; position: relative; top: -5px; margin-right: 10px }
div.oembedall-lanyard .place-context { font-size: 0.889em }
div.oembedall-lanyard .prominent-place .sub-place { display: block }
div.oembedall-lanyard .prominent-place { font-size: 1.125em; line-height: 1.1em; font-weight: 400 }
div.oembedall-lanyard .main-date { color: rgba(140, 180, 224, 1); font-weight: 700; line-height: 1.1 }
div.oembedall-lanyard .first { width: 48.57%; margin: 0 0 0 2.857% }
.mermaid .label { color: rgba(51, 51, 51, 1) }
.node circle, .node polygon, .node rect { fill: rgba(205, 228, 152, 1); stroke: rgba(19, 84, 12, 1); stroke-width: 1px }
.edgePath .path { stroke: rgba(0, 128, 0, 1); stroke-width: 1.5px }
.cluster rect { fill: rgba(205, 255, 178, 1); rx: 40; stroke: rgba(110, 170, 73, 1); stroke-width: 1px }
.cluster text { fill: rgba(51, 51, 51, 1) }
.actor { stroke: rgba(19, 84, 12, 1); fill: rgba(205, 228, 152, 1) }
text.actor { fill: rgba(0, 0, 0, 1); stroke: none }
.actor-line { stroke: rgba(128, 128, 128, 1) }
.messageLine0 { stroke-width: 1.5; marker-end: “url(#arrowhead)”; stroke: rgba(51, 51, 51, 1) }
.messageLine1 { stroke-width: 1.5; stroke: rgba(51, 51, 51, 1) }
#arrowhead { fill: rgba(51, 51, 51, 1) }
#crosshead path { fill: rgba(51, 51, 51, 1) !important; stroke: rgba(51, 51, 51, 1) !important }
.messageText { fill: rgba(51, 51, 51, 1); stroke: none }
.labelBox { stroke: rgba(50, 105, 50, 1); fill: rgba(205, 228, 152, 1) }
.labelText, .loopText { fill: rgba(0, 0, 0, 1); stroke: none }
.loopLine { stroke-width: 2; marker-end: “url(#arrowhead)”; stroke: rgba(50, 105, 50, 1) }
.note { stroke: rgba(110, 170, 73, 1); fill: rgba(255, 245, 173, 1) }
.noteText { fill: rgba(0, 0, 0, 1); stroke: none; font-family: “trebuchet ms”, verdana, arial; font-size: 14px }
.section { stroke: none; opacity: 0.2 }
.section0, .section2 { fill: rgba(110, 170, 73, 1) }
.section1, .section3 { fill: rgba(255, 255, 255, 1); opacity: 0.2 }
.sectionTitle0, .sectionTitle1, .sectionTitle2, .sectionTitle3 { fill: rgba(51, 51, 51, 1) }
.sectionTitle { text-anchor: start; font-size: 11px; text-height: 14px }
.grid .tick { stroke: rgba(211, 211, 211, 1); opacity: 0.3; shape-rendering: crispEdges }
.grid path { stroke-width: 0 }
.today { fill: none; stroke: rgba(255, 0, 0, 1); stroke-width: 2px }
.task { stroke-width: 2 }
.taskText { text-anchor: middle; font-size: 11px }
.taskTextOutsideRight { fill: rgba(0, 0, 0, 1); text-anchor: start; font-size: 11px }
.taskTextOutsideLeft { fill: rgba(0, 0, 0, 1); text-anchor: end; font-size: 11px }
.taskText0, .taskText1, .taskText2, .taskText3 { fill: rgba(255, 255, 255, 1) }
.task0, .task1, .task2, .task3 { fill: rgba(72, 126, 58, 1); stroke: rgba(19, 84, 12, 1) }
.taskTextOutside0, .taskTextOutside1, .taskTextOutside2, .taskTextOutside3 { fill: rgba(0, 0, 0, 1) }
.active0, .active1, .active2, .active3 { fill: rgba(205, 228, 152, 1); stroke: rgba(19, 84, 12, 1) }
.activeText0, .activeText1, .activeText2, .activeText3 { fill: rgba(0, 0, 0, 1) !important }
.done0, .done1, .done2, .done3 { stroke: rgba(128, 128, 128, 1); fill: rgba(211, 211, 211, 1); stroke-width: 2 }
.doneText0, .doneText1, .doneText2, .doneText3 { fill: rgba(0, 0, 0, 1) !important }
.crit0, .crit1, .crit2, .crit3 { stroke: rgba(255, 136, 136, 1); fill: rgba(255, 0, 0, 1); stroke-width: 2 }
.activeCrit0, .activeCrit1, .activeCrit2, .activeCrit3 { stroke: rgba(255, 136, 136, 1); fill: rgba(205, 228, 152, 1); stroke-width: 2 }
.doneCrit0, .doneCrit1, .doneCrit2, .doneCrit3 { stroke: rgba(255, 136, 136, 1); fill: rgba(211, 211, 211, 1); stroke-width: 2; cursor: pointer; shape-rendering: crispEdges }
.activeCritText0, .activeCritText1, .activeCritText2, .activeCritText3, .doneCritText0, .doneCritText1, .doneCritText2, .doneCritText3 { fill: rgba(0, 0, 0, 1) !important }
.titleText { text-anchor: middle; font-size: 18px; fill: rgba(0, 0, 0, 1) }
text { font-family: “trebuchet ms”, verdana, arial; font-size: 14px }
html { height: 100% }
body { margin: 0 !important; padding: 5px 20px 26px !important; background-color: rgba(255, 255, 255, 1); font-family: “Lucida Grande”, “Segoe UI”, “Apple SD Gothic Neo”, “Malgun Gothic”, “Lucida Sans Unicode”, Helvetica, Arial, sans-serif; font-size: 0.9em; overflow-x: hidden; overflow-y: auto }
br, h1, h2, h3, h4, h5, h6 { clear: both }
hr.page { background: url(“data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAECAYAAACtBE5DAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OENDRjNBN0E2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OENDRjNBN0I2NTZBMTFFMEI3QjRBODM4NzJDMjlGNDgiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo4Q0NGM0E3ODY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo4Q0NGM0E3OTY1NkExMUUwQjdCNEE4Mzg3MkMyOUY0OCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PqqezsUAAAAfSURBVHjaYmRABcYwBiM2QSA4y4hNEKYDQxAEAAIMAHNGAzhkPOlYAAAAAElFTkSuQmCC”) repeat-x; border: 0; height: 3px; padding: 0 }
hr.underscore { border-top-style: dashed !important }
body>:first-child { margin-top: 0 !important }
img.plugin { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); border-radius: 3px }
iframe { border: 0 }
figure { -webkit-margin-before: 0; -webkit-margin-after: 0; -webkit-margin-start: 0; -webkit-margin-end: 0 }
kbd { border: 1px solid rgba(170, 170, 170, 1); -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; -moz-box-shadow: 1px 2px 2px #ddd; -webkit-box-shadow: 1px 2px 2px #ddd; box-shadow: 1px 2px 2px rgba(221, 221, 221, 1); background-color: rgba(249, 249, 249, 1); background-image: linear-gradient(0deg, rgba(238, 238, 238, 1), rgba(249, 249, 249, 1), rgba(238, 238, 238, 1)); padding: 1px 3px; font-family: inherit; font-size: 0.85em }
.oembeded .oembed_photo { display: inline-block }
img[data-echo] { margin: 25px 0; width: 100px; height: 100px; background: url(“../img/ajax.gif”) center no-repeat rgba(255, 255, 255, 1) }
.spinner { display: inline-block; width: 10px; height: 10px; margin-bottom: -0.1em; border-top: 2px solid rgba(0, 0, 0, 0); border-right: 2px solid rgba(0, 0, 0, 0.5); border-bottom: 2px solid rgba(0, 0, 0, 0.5); border-left: 2px solid rgba(0, 0, 0, 0.5); border-radius: 100%; -webkit-animation: spin 1s infinite linear; animation: 1s linear infinite spin }
.spinner:after { content: “”; display: block; width: 0; height: 0; position: absolute; top: -6px; left: 0; border-top: 4px solid rgba(0, 0, 0, 0); border-right: 4px solid rgba(0, 0, 0, 0); border-bottom: 4px solid rgba(0, 0, 0, 0.5); border-left: 4px solid rgba(0, 0, 0, 0); -webkit-transform: rotate(45deg); transform: rotate(45deg) }
@-webkit-keyframes spin{to{-webkit-transform:rotate(360deg)}}
@keyframes spin { 100% { transform: rotate(360deg) } }
p.toc { margin: 0 !important }
p.toc ul { padding-left: 10px }
p.toc>ul { padding: 10px; margin: 0 10px; display: inline-block; border: 1px solid rgba(237, 237, 237, 1); border-radius: 5px }
p.toc li, p.toc ul { list-style-type: none }
p.toc li { width: 100%; padding: 0; overflow: hidden }
p.toc li a::after { content: “.” }
p.toc li a:before { content: “• ” }
p.toc h5 { text-transform: uppercase }
p.toc .title { float: left; padding-right: 3px }
p.toc .number { margin: 0; float: right; padding-left: 3px; background: rgba(255, 255, 255, 1); display: none }
input.task-list-item { margin-left: -1.62em }
.markdown { font-family: “Hiragino Sans GB”, “Microsoft YaHei”, STHeiti, SimSun, “Lucida Grande”, “Lucida Sans Unicode”, “Lucida Sans”, “Segoe UI”, AppleSDGothicNeo-Medium, “Malgun Gothic”, Verdana, Tahoma, sans-serif; padding: 20px }
.markdown a { text-decoration: none; vertical-align: baseline }
.markdown a:hover { text-decoration: underline }
.markdown h1 { font-size: 2.2em; font-weight: 700; margin: 1.5em 0 1em }
.markdown h2 { font-size: 1.8em; font-weight: 700; margin: 1.275em 0 0.85em }
.markdown h3 { font-size: 1.6em; font-weight: 700; margin: 1.125em 0 0.75em }
.markdown h4 { font-size: 1.4em; font-weight: 700; margin: 0.99em 0 0.66em }
.markdown h5 { font-size: 1.2em; font-weight: 700; margin: 0.855em 0 0.57em }
.markdown h6 { font-size: 1em; font-weight: 700; margin: 0.75em 0 0.5em }
.markdown h1+p, .markdown h1:first-child, .markdown h2+p, .markdown h2:first-child, .markdown h3+p, .markdown h3:first-child, .markdown h4+p, .markdown h4:first-child, .markdown h5+p, .markdown h5:first-child, .markdown h6+p, .markdown h6:first-child { margin-top: 0 }
.markdown hr { border: 1px solid rgba(204, 204, 204, 1) }
.markdown p { margin: 1em 0; word-wrap: break-word }
.markdown ol { list-style-type: decimal }
.markdown li { display: list-item; line-height: 1.4em }
.markdown blockquote { margin: 1em 20px }
.markdown blockquote>:first-child { margin-top: 0 }
.markdown blockquote>:last-child { margin-bottom: 0 }
.markdown blockquote cite:before { content: “— ” }
.markdown .code { border-radius: 3px; word-wrap: break-word }
.markdown pre { border-radius: 3px; word-wrap: break-word; border: 1px solid rgba(204, 204, 204, 1); overflow: auto; padding: 0.5em }
.markdown pre code { border: 0; display: block }
.markdown pre>code { font-family: Consolas, Inconsolata, Courier, monospace; font-weight: 700; white-space: pre; margin: 0 }
.markdown code { border-radius: 3px; word-wrap: break-word; border: 1px solid rgba(204, 204, 204, 1); padding: 0 5px; margin: 0 2px }
.markdown img { max-width: 100% }
.markdown mark { color: rgba(0, 0, 0, 1); background-color: rgba(252, 248, 227, 1) }
.markdown table { padding: 0; border-collapse: collapse; border-spacing: 0; margin-bottom: 16px }
.markdown table tr td, .markdown table tr th { border: 1px solid rgba(204, 204, 204, 1); margin: 0; padding: 6px 13px }
.markdown table tr th { font-weight: 700 }
.markdown table tr th>:first-child { margin-top: 0 }
.markdown table tr th>:last-child { margin-bottom: 0 }
.markdown table tr td>:first-child { margin-top: 0 }
.markdown table tr td>:last-child { margin-bottom: 0 }
@import url(“http://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700”);
.haroopad { padding: 20px; color: rgba(34, 34, 34, 1); font-size: 15px; font-family: “Roboto Condensed”, Tauri, “Hiragino Sans GB”, “Microsoft YaHei”, STHeiti, SimSun, “Lucida Grande”, “Lucida Sans Unicode”, “Lucida Sans”, “Segoe UI”, AppleSDGothicNeo-Medium, “Malgun Gothic”, Verdana, Tahoma, sans-serif; background: rgba(255, 255, 255, 1); line-height: 1.6; -webkit-font-smoothing: antialiased }
.haroopad a { color: rgba(50, 105, 160, 1) }
.haroopad a:hover { color: rgba(65, 131, 196, 1) }
.haroopad h2 { border-bottom: 1px solid rgba(230, 230, 230, 1) }
.haroopad h6 { color: rgba(119, 119, 119, 1) }
.haroopad hr { border: 1px solid rgba(230, 230, 230, 1) }
.haroopad blockquote>code, .haroopad h1>code, .haroopad h2>code, .haroopad h3>code, .haroopad h4>code, .haroopad h5>code, .haroopad h6>code, .haroopad li>code, .haroopad p>code, .haroopad td>code { font-family: Consolas, “Liberation Mono”, Menlo, Courier, monospace; font-size: 85%; background-color: rgba(0, 0, 0, 0.02); padding: 0.2em 0.5em; border: 1px solid rgba(239, 239, 239, 1) }
.haroopad pre>code { font-size: 1em; letter-spacing: -1px; font-weight: 700 }
.haroopad blockquote { border-left: 4px solid rgba(230, 230, 230, 1); padding: 0 15px; color: rgba(119, 119, 119, 1) }
.haroopad table { background-color: rgba(250, 250, 250, 1) }
.haroopad table tr td, .haroopad table tr th { border: 1px solid rgba(230, 230, 230, 1) }
.haroopad table tr:nth-child(2n) { background-color: rgba(242, 242, 242, 1) }
.hljs { display: block; overflow-x: auto; padding: 0.5em; background: rgba(253, 246, 227, 1); color: rgba(101, 123, 131, 1); -webkit-text-size-adjust: none }
.diff .hljs-header, .hljs-comment, .hljs-doctype, .hljs-javadoc, .hljs-pi, .lisp .hljs-string { color: rgba(147, 161, 161, 1) }
.css .hljs-tag, .hljs-addition, .hljs-keyword, .hljs-request, .hljs-status, .hljs-winutils, .method, .nginx .hljs-title { color: rgba(133, 153, 0, 1) }
.hljs-command, .hljs-dartdoc, .hljs-hexcolor, .hljs-link_url, .hljs-number, .hljs-phpdoc, .hljs-regexp, .hljs-rules .hljs-value, .hljs-string, .hljs-tag .hljs-value, .tex .hljs-formula { color: rgba(42, 161, 152, 1) }
.css .hljs-function, .hljs-built_in, .hljs-chunk, .hljs-decorator, .hljs-id, .hljs-identifier, .hljs-localvars, .hljs-title, .vhdl .hljs-literal { color: rgba(38, 139, 210, 1) }
.hljs-attribute, .hljs-class .hljs-title, .hljs-constant, .hljs-link_reference, .hljs-parent, .hljs-type, .hljs-variable, .lisp .hljs-body, .smalltalk .hljs-number { color: rgba(181, 137, 0, 1) }
.css .hljs-pseudo, .diff .hljs-change, .hljs-attr_selector, .hljs-cdata, .hljs-header, .hljs-pragma, .hljs-preprocessor, .hljs-preprocessor .hljs-keyword, .hljs-shebang, .hljs-special, .hljs-subst, .hljs-symbol, .hljs-symbol .hljs-string { color: rgba(203, 75, 22, 1) }
.hljs-deletion, .hljs-important { color: rgba(220, 50, 47, 1) }
.hljs-link_label { color: rgba(108, 113, 196, 1) }
.tex .hljs-formula { background: rgba(238, 232, 213, 1) }
.MathJax_Hover_Frame { border-radius: 0.25em; -webkit-border-radius: .25em; -moz-border-radius: .25em; -khtml-border-radius: .25em; box-shadow: 0 0 15px rgba(136, 51, 170, 1); -webkit-box-shadow: 0 0 15px #83A; -moz-box-shadow: 0 0 15px #83A; -khtml-box-shadow: 0 0 15px #83A; border: 1px solid rgba(170, 102, 221, 1) !important; display: inline-block; position: absolute }
.MathJax_Hover_Arrow { position: absolute; width: 15px; height: 11px; cursor: pointer }
#MathJax_About { position: fixed; left: 50%; width: auto; text-align: center; border: 3px outset; padding: 1em 2em; background-color: rgba(221, 221, 221, 1); color: rgba(0, 0, 0, 1); cursor: default; font-family: message-box; font-size: 120%; font-style: normal; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px; -khtml-border-radius: 15px; box-shadow: 0 10px 20px rgba(128, 128, 128, 1); -webkit-box-shadow: 0 10px 20px gray; -moz-box-shadow: 0 10px 20px gray; -khtml-box-shadow: 0 10px 20px gray; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color=\’gray\’, Positive=\’true\’) }
.MathJax_Menu { position: absolute; background-color: rgba(255, 255, 255, 1); color: rgba(0, 0, 0, 1); width: auto; padding: 2px; border: 1px solid rgba(204, 204, 204, 1); margin: 0; cursor: default; font: / normal menu; text-align: left; text-indent: 0; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; box-shadow: 0 10px 20px rgba(128, 128, 128, 1); -webkit-box-shadow: 0 10px 20px gray; -moz-box-shadow: 0 10px 20px gray; -khtml-box-shadow: 0 10px 20px gray; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color=\’gray\’, Positive=\’true\’) }
.MathJax_MenuItem { padding: 2px 2em; background: left top }
.MathJax_MenuArrow { position: absolute; right: 0.5em; color: rgba(102, 102, 102, 1) }
.MathJax_MenuActive .MathJax_MenuArrow { color: rgba(255, 255, 255, 1) }
.MathJax_MenuArrow.RTL { left: 0.5em; right: auto }
.MathJax_MenuCheck { position: absolute; left: 0.7em }
.MathJax_MenuCheck.RTL { right: 0.7em; left: auto }
.MathJax_MenuRadioCheck { position: absolute; left: 1em }
.MathJax_MenuRadioCheck.RTL { right: 1em; left: auto }
.MathJax_MenuLabel { padding: 2px 2em 4px 1.33em; font-style: italic }
.MathJax_MenuRule { border-top: 1px solid rgba(204, 204, 204, 1); margin: 4px 1px 0 }
.MathJax_MenuDisabled { color: rgba(128, 128, 128, 1) }
.MathJax_MenuActive { background-color: rgba(181, 213, 255, 1); color: rgba(0, 0, 0, 1) }
.MathJax_Menu_Close { position: absolute; width: 31px; height: 31px; top: -15px; left: -15px }
#MathJax_Zoom { position: absolute; background-color: rgba(240, 240, 240, 1); overflow: auto; display: block; z-index: 301; padding: 0.5em; border: 1px solid rgba(0, 0, 0, 1); margin: 0; font-weight: 400; font-style: normal; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; box-shadow: 5px 5px 15px rgba(170, 170, 170, 1); -webkit-box-shadow: 5px 5px 15px #AAA; -moz-box-shadow: 5px 5px 15px #AAA; -khtml-box-shadow: 5px 5px 15px #AAA; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color=\’gray\’, Positive=\’true\’) }
#MathJax_ZoomOverlay { position: absolute; left: 0; top: 0; z-index: 300; display: inline-block; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background-color: rgba(255, 255, 255, 1); opacity: 0; filter: alpha(opacity=0) }
#MathJax_ZoomFrame { position: relative; display: inline-block; height: 0; width: 0 }
#MathJax_ZoomEventTrap { position: absolute; left: 0; top: 0; z-index: 302; display: inline-block; border: 0; padding: 0; margin: 0; background-color: rgba(255, 255, 255, 1); opacity: 0; filter: alpha(opacity=0) }
.MathJax_Preview { color: rgba(136, 136, 136, 1) }
#MathJax_Message { position: fixed; left: 1px; bottom: 2px; background-color: rgba(230, 230, 230, 1); border: 1px solid rgba(149, 149, 149, 1); margin: 0; padding: 2px 8px; z-index: 102; color: rgba(0, 0, 0, 1); font-size: 80%; width: auto; white-space: nowrap }
#MathJax_MSIE_Frame { position: absolute; top: 0; left: 0; width: 0; z-index: 101; border: 0; margin: 0; padding: 0 }
.MathJax_Error { color: rgba(204, 0, 0, 1); font-style: italic }
footer { position: fixed; font-size: 0.8em; text-align: right; bottom: 0; margin-left: -25px; height: 20px; width: 100% }
出处:http://www.cnblogs.com/wanghongze/p/7941252.html