|
8分17秒
本视频采用html5方式播放,如无法正常播放,请将浏览器升级至最新版本,推荐火狐,chrome,360浏览器
如果装有迅雷,播放视频呈现直接下载状态,请调整 迅雷系统设置-基本设置-启动-监视全部浏览器 (去掉这个选项)
步骤
1
:
完整效果
步骤
2
:
效果
步骤
3
:
布局
步骤
4
:
纯html
步骤
5
:
加上样式
步骤
6
:
样式讲解
步骤
7
:
再整合在一起
首先是一个完整的页脚,不过我们本知识点只学习上面图片和中间这部分,下面的内容放在 页脚二中学习,分开得小一点,大家好消化一些。
");
window.frames["iframe_show3165"].document.write(decodeHtml($("textarea#stepcodeTextarea3165").val()));
window.frames["iframe_show3165"].document.close();
$(window.frames["iframe_show3165"]).load(function(){
$("#iframe_show3165").height($("#iframe_show3165").contents().find("body").height()+showittryitheight);
});
$("#iframe_show3165").height($("#iframe_show3165").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://127.0.0.1/study../../../js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://127.0.0.1/study../../../css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://127.0.0.1/study../../../js/bootstrap/3.3.6/bootstrap.min.js"></script>
</head>
<style>
body{
font-size: 12px;
font-family: Arial;
}
a{
color:#999;
}
a:hover{
text-decoration:none;
color: #C40000;
}
div.footer div.copyright div.white_link a {
color: white;
padding: 0px 5px;
}
img.cateye {
margin-left: 20px;
}
div.footer_desc div.descColumn {
width: 20%;
float: left;
padding-left: 15px;
}
div.license div.copyRightYear {
margin: 10px 0px;
color: #686868;
}
div.copyright span.slash {
color: white;
}
div.footer {
margin: 0px 0px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: solid;
border-top-color: #e7e7e7;
}
div.license span {
color: #A4A4A4;
}
div.license {
margin-left: 10px;
padding-bottom: 30px;
}
div.footer_desc a {
display: block;
padding-top: 3px;
}
div.copyright {
background-color: black;
border-top-style: solid;
border-top-width: 2px;
border-top-color: solid;
border-top-color: #C40000;
}
div.footer div.copyright div.white_link {
padding: 10px 0px;
margin-left: 10px;
}
div.footer_ensure {
margin-top: 24px;
margin-bottom: 24px;
text-align: center;
}
div.footer_desc {
border-top-style: solid;
border-top-width: 1px;
border-top-color: #e7e7e7;
padding-top: 30px;
margin: 0px 20px;
}
div.footer_desc div.descColumn span.descColumnTitle {
color: #646464;
font-weight: bold;
font-size: 16px;
}
</style>
<div style="display: block;" class="footer" id="footer">
<div class="footer_ensure" id="footer_ensure">
<a href="#nowhere">
<img src="http://127.0.0.1/tmall../../../img/site/ensure.png">
</a>
</div>
<div class="footer_desc" id="footer_desc">
<div class="descColumn">
<span class="descColumnTitle">购物指南</span>
<a href="#nowhere">免费注册</a>
<a href="#nowhere">开通支付宝</a>
<a href="#nowhere">支付宝充值</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">天猫保障</span>
<a href="#nowhere">发票保障</a>
<a href="#nowhere">售后规则</a>
<a href="#nowhere">缺货赔付</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">支付方式</span>
<a href="#nowhere">快捷支付</a>
<a href="#nowhere">信用卡</a>
<a href="#nowhere">蚂蚁花呗</a>
<a href="#nowhere">货到付款</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">商家服务</span>
<a href="#nowhere">商家入驻</a>
<a href="#nowhere">商家中心</a>
<a href="#nowhere">天猫智库</a>
<a href="#nowhere">天猫规则</a>
<a href="#nowhere">物流服务</a>
<a href="#nowhere">喵言喵语</a>
<a href="#nowhere">运营服务</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">手机天猫</span>
<a href="#nowhere"><img src="http://127.0.0.1/tmall../../../img/site/ma.png"></a>
</div>
</div>
<div style="clear:both"></div>
<img src="http://127.0.0.1/tmall../../../img/site/cateye.png" class="cateye" id="cateye">
<div class="copyright" id="copyright">
<div class="white_link">
<a href="#nowhere">关于天猫</a>
<a href="#nowhere"> 帮助中心</a>
<a href="#nowhere">开放平台</a>
<a href="#nowhere"> 诚聘英才</a>
<a href="#nowhere">联系我们</a>
<a href="#nowhere">网站合作</a>
<a href="#nowhere">法律声明</a>
<a href="#nowhere">知识产权</a>
<a href="#nowhere"> 廉正举报 </a>
</div>
<div class="white_link">
<a href="#nowhere"> 阿里巴巴集团</a><span class="slash">|</span>
<a href="#nowhere"> 淘宝网</a><span class="slash">|</span>
<a href="#nowhere">天猫 </a><span class="slash">|</span>
<a href="#nowhere"> 聚划算</a><span class="slash">|</span>
<a href="#nowhere">全球速卖通</a><span class="slash">|</span>
<a href="#nowhere">阿里巴巴国际交易市场</a><span class="slash">|</span>
<a href="#nowhere">1688</a><span class="slash">|</span>
<a href="#nowhere">阿里妈妈</a><span class="slash">|</span>
<a href="#nowhere"> 阿里旅行·去啊 </a><span class="slash">|</span>
<a href="#nowhere"> 阿里云计算 </a><span class="slash">|</span>
<a href="#nowhere"> 阿里通信 </a><span class="slash">|</span>
<a href="#nowhere"> YunOS </a><span class="slash">|</span>
<a href="#nowhere"> 阿里旅行·去啊 </a><span class="slash">|</span>
<a href="#nowhere"> 万网 </a><span class="slash">|</span>
<a href="#nowhere"> 高德 </a><span class="slash">|</span>
<a href="#nowhere"> 优视 </a><span class="slash">|</span>
<a href="#nowhere"> 友盟 </a><span class="slash">|</span>
<a href="#nowhere"> 虾米 </a><span class="slash">|</span>
<a href="#nowhere"> 天天动听 </a><span class="slash">|</span>
<a href="#nowhere"> 来往 </a><span class="slash">|</span>
<a href="#nowhere"> 钉钉 </a><span class="slash">|</span>
<a href="#nowhere"> 支付宝 </a>
</div>
<div class="license">
<span>增值电信业务经营许可证: 浙B2-20110446</span>
<span>网络文化经营许可证:浙网文[2015]0295-065号</span>
<span>互联网医疗保健信息服务 审核同意书 浙卫网审【2014】6号 </span>
<span>互联网药品信息服务资质证书编号:浙-(经营性)-2012-0005</span>
<div class="copyRightYear">© 2003-2016 TMALL.COM 版权所有</div>
<div>
<img src="http://127.0.0.1/tmall../../../img/site/copyRight1.jpg">
<img src="http://127.0.0.1/tmall../../../img/site/copyRight2.jpg">
</div>
</div>
</div>
</div>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://127.0.0.1/study../../../js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://127.0.0.1/study../../../css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://127.0.0.1/study../../../js/bootstrap/3.3.6/bootstrap.min.js"></script>
</head>
<style>
body{
font-size: 12px;
font-family: Arial;
}
a{
color:#999;
}
a:hover{
text-decoration:none;
color: #C40000;
}
div.footer div.copyright div.white_link a {
color: white;
padding: 0px 5px;
}
img.cateye {
margin-left: 20px;
}
div.footer_desc div.descColumn {
width: 20%;
float: left;
padding-left: 15px;
}
div.license div.copyRightYear {
margin: 10px 0px;
color: #686868;
}
div.copyright span.slash {
color: white;
}
div.footer {
margin: 0px 0px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: solid;
border-top-color: #e7e7e7;
}
div.license span {
color: #A4A4A4;
}
div.license {
margin-left: 10px;
padding-bottom: 30px;
}
div.footer_desc a {
display: block;
padding-top: 3px;
}
div.copyright {
background-color: black;
border-top-style: solid;
border-top-width: 2px;
border-top-color: solid;
border-top-color: #C40000;
}
div.footer div.copyright div.white_link {
padding: 10px 0px;
margin-left: 10px;
}
div.footer_ensure {
margin-top: 24px;
margin-bottom: 24px;
text-align: center;
}
div.footer_desc {
border-top-style: solid;
border-top-width: 1px;
border-top-color: #e7e7e7;
padding-top: 30px;
margin: 0px 20px;
}
div.footer_desc div.descColumn span.descColumnTitle {
color: #646464;
font-weight: bold;
font-size: 16px;
}
</style>
<div style="display: block;" class="footer" id="footer">
<div class="footer_ensure" id="footer_ensure">
<a href="#nowhere">
<img src="http://127.0.0.1/tmall../../../img/site/ensure.png">
</a>
</div>
<div class="footer_desc" id="footer_desc">
<div class="descColumn">
<span class="descColumnTitle">购物指南</span>
<a href="#nowhere">免费注册</a>
<a href="#nowhere">开通支付宝</a>
<a href="#nowhere">支付宝充值</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">天猫保障</span>
<a href="#nowhere">发票保障</a>
<a href="#nowhere">售后规则</a>
<a href="#nowhere">缺货赔付</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">支付方式</span>
<a href="#nowhere">快捷支付</a>
<a href="#nowhere">信用卡</a>
<a href="#nowhere">蚂蚁花呗</a>
<a href="#nowhere">货到付款</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">商家服务</span>
<a href="#nowhere">商家入驻</a>
<a href="#nowhere">商家中心</a>
<a href="#nowhere">天猫智库</a>
<a href="#nowhere">天猫规则</a>
<a href="#nowhere">物流服务</a>
<a href="#nowhere">喵言喵语</a>
<a href="#nowhere">运营服务</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">手机天猫</span>
<a href="#nowhere"><img src="http://127.0.0.1/tmall../../../img/site/ma.png"></a>
</div>
</div>
<div style="clear:both"></div>
<img src="http://127.0.0.1/tmall../../../img/site/cateye.png" class="cateye" id="cateye">
<div class="copyright" id="copyright">
<div class="white_link">
<a href="#nowhere">关于天猫</a>
<a href="#nowhere"> 帮助中心</a>
<a href="#nowhere">开放平台</a>
<a href="#nowhere"> 诚聘英才</a>
<a href="#nowhere">联系我们</a>
<a href="#nowhere">网站合作</a>
<a href="#nowhere">法律声明</a>
<a href="#nowhere">知识产权</a>
<a href="#nowhere"> 廉正举报 </a>
</div>
<div class="white_link">
<a href="#nowhere"> 阿里巴巴集团</a><span class="slash">|</span>
<a href="#nowhere"> 淘宝网</a><span class="slash">|</span>
<a href="#nowhere">天猫 </a><span class="slash">|</span>
<a href="#nowhere"> 聚划算</a><span class="slash">|</span>
<a href="#nowhere">全球速卖通</a><span class="slash">|</span>
<a href="#nowhere">阿里巴巴国际交易市场</a><span class="slash">|</span>
<a href="#nowhere">1688</a><span class="slash">|</span>
<a href="#nowhere">阿里妈妈</a><span class="slash">|</span>
<a href="#nowhere"> 阿里旅行·去啊 </a><span class="slash">|</span>
<a href="#nowhere"> 阿里云计算 </a><span class="slash">|</span>
<a href="#nowhere"> 阿里通信 </a><span class="slash">|</span>
<a href="#nowhere"> YunOS </a><span class="slash">|</span>
<a href="#nowhere"> 阿里旅行·去啊 </a><span class="slash">|</span>
<a href="#nowhere"> 万网 </a><span class="slash">|</span>
<a href="#nowhere"> 高德 </a><span class="slash">|</span>
<a href="#nowhere"> 优视 </a><span class="slash">|</span>
<a href="#nowhere"> 友盟 </a><span class="slash">|</span>
<a href="#nowhere"> 虾米 </a><span class="slash">|</span>
<a href="#nowhere"> 天天动听 </a><span class="slash">|</span>
<a href="#nowhere"> 来往 </a><span class="slash">|</span>
<a href="#nowhere"> 钉钉 </a><span class="slash">|</span>
<a href="#nowhere"> 支付宝 </a>
</div>
<div class="license">
<span>增值电信业务经营许可证: 浙B2-20110446</span>
<span>网络文化经营许可证:浙网文[2015]0295-065号</span>
<span>互联网医疗保健信息服务 审核同意书 浙卫网审【2014】6号 </span>
<span>互联网药品信息服务资质证书编号:浙-(经营性)-2012-0005</span>
<div class="copyRightYear">© 2003-2016 TMALL.COM 版权所有</div>
<div>
<img src="http://127.0.0.1/tmall../../../img/site/copyRight1.jpg">
<img src="http://127.0.0.1/tmall../../../img/site/copyRight2.jpg">
</div>
</div>
</div>
</div>
");
window.frames["iframe3165"].document.write(decodeHtml(code3165));
window.frames["iframe3165"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3165"]).load(function(){
$("#iframe3165").height($("#iframe3165").contents().find("body").height()+showittryitheight);
});
$("#iframe3165").height($("#iframe3165").contents().find("body").height()+showittryitheight);
alreadyWriteCode3165 = code3165;
$("#rendering3165").hide();
$("#rendered3165").show();
}
var tRereshRetry2DemoPanel3165 = setInterval(rereshRetry2DemoPanel3165,1000);
var binded3165 = false;
$("textarea#stepcodeTextarea3165").keyup(function(){
if(!binded3165){
$(window).bind('beforeunload',function(){
binded3165 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code3165 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code3165!=newCode){
// window.frames["iframe3165"].document.write("
");
// window.frames["iframe3165"].document.write(decodeHtml($("textarea#stepcodeTextarea3165").val()));
// window.frames["iframe3165"].document.close();
// $(window.frames["iframe3165"]).load(function(){
// $("#iframe3165").height($("#iframe3165").contents().find("body").height()+showittryitheight);
// });
// code3165 = newCode;
// }
});
$(".tryButton3165").click(function(){
$("#tryDiv3165").show();
$("#stepcodeTextarea3165").focus();
$("#stepcodeTextarea3165").height(200);
$("#iframe3165").height(0);
window.frames["iframe3165"].document.write("
");
window.frames["iframe3165"].document.write(decodeHtml($("textarea#stepcodeTextarea3165").val()));
window.frames["iframe3165"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3165"]).load(function(){
$("#iframe3165").height($("#iframe3165").contents().find("body").height()+showittryitheight);
});
$("#iframe3165").height($("#iframe3165").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor3165.focus();
editor3165.setSize(null, "250");
$("#rendering3165").hide();
$("#rendered3165").hide();
});
var mixedMode = {
name: "htmlmixed",
scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i,
mode: null},
{matches: /(text|application)\/(x-)?vb(a|script)/i,
mode: "vbscript"}]
};
var editor3165 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea3165"), {
lineNumbers: true,
styleActiveLine: true,
matchBrackets: true,
mode:"text/html",
theme:"eclipse",
selectionPointer: true,
lineWrapping: true,
extraKeys: {
"Alt-/": "autocomplete",
"Ctrl-F": "findPersistent",
"F8": function(cm) {
cm.setOption("fullScreen", !cm.getOption("fullScreen"));
},
"Esc": function(cm) {
if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false);
}
}
});
editor3165.on("change",function(doc){
if(!binded3165){
$(window).bind('beforeunload',function(){
binded3165 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code3165 = newCode;
$("textarea#stepcodeTextarea3165").val(newCode);
if(alreadyWriteCode3165!=code3165){
lastModifedTime3165 = new Date().getTime();
$("#rendering3165").show();
$("#rendered3165").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor3165 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor3165.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv3165").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
");
window.frames["iframe_show3171"].document.write(decodeHtml($("textarea#stepcodeTextarea3171").val()));
window.frames["iframe_show3171"].document.close();
$(window.frames["iframe_show3171"]).load(function(){
$("#iframe_show3171").height($("#iframe_show3171").contents().find("body").height()+showittryitheight);
});
$("#iframe_show3171").height($("#iframe_show3171").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://127.0.0.1/study../../../js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://127.0.0.1/study../../../css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://127.0.0.1/study../../../js/bootstrap/3.3.6/bootstrap.min.js"></script>
</head>
<style>
div.footer{
margin: 0px 0px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #e7e7e7;
}
div.footer_ensure{
margin-top: 24px;
margin-bottom: 24px;
text-align: center;
}
div.footer_desc{
border-top-style: solid;
border-top-width: 1px;
border-top-color: #e7e7e7;
padding-top: 30px;
margin: 0px 20px;
}
div.footer_desc div.descColumn{
width: 20%;
float: left;
padding-left: 15px;
}
div.footer_desc div.descColumn span.descColumnTitle{
color: #646464;
font-weight: bold;
font-size: 16px;
}
div.footer_desc a{
display: block;
padding-top: 3px;
}
body{
font-size: 12px;
font-family: Arial;
}
a{
color:#999;
}
a:hover{
text-decoration:none;
color: #C40000;
}
</style>
<div style="display: block;" class="footer" id="footer">
<div class="footer_ensure" id="footer_ensure">
<a href="#nowhere">
<img src="http://127.0.0.1/tmall../../../img/site/ensure.png">
</a>
</div>
<div class="footer_desc" id="footer_desc">
<div class="descColumn">
<span class="descColumnTitle">购物指南</span>
<a href="#nowhere">免费注册</a>
<a href="#nowhere">开通支付宝</a>
<a href="#nowhere">支付宝充值</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">天猫保障</span>
<a href="#nowhere">发票保障</a>
<a href="#nowhere">售后规则</a>
<a href="#nowhere">缺货赔付</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">支付方式</span>
<a href="#nowhere">快捷支付</a>
<a href="#nowhere">信用卡</a>
<a href="#nowhere">蚂蚁花呗</a>
<a href="#nowhere">货到付款</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">商家服务</span>
<a href="#nowhere">商家入驻</a>
<a href="#nowhere">商家中心</a>
<a href="#nowhere">天猫智库</a>
<a href="#nowhere">天猫规则</a>
<a href="#nowhere">物流服务</a>
<a href="#nowhere">喵言喵语</a>
<a href="#nowhere">运营服务</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">手机天猫</span>
<a href="#nowhere"><img src="http://127.0.0.1/tmall../../../img/site/ma.png"></a>
</div>
</div>
<div style="clear:both"></div>
</div>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://127.0.0.1/study../../../js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://127.0.0.1/study../../../css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://127.0.0.1/study../../../js/bootstrap/3.3.6/bootstrap.min.js"></script>
</head>
<style>
div.footer{
margin: 0px 0px;
border-top-style: solid;
border-top-width: 1px;
border-top-color: #e7e7e7;
}
div.footer_ensure{
margin-top: 24px;
margin-bottom: 24px;
text-align: center;
}
div.footer_desc{
border-top-style: solid;
border-top-width: 1px;
border-top-color: #e7e7e7;
padding-top: 30px;
margin: 0px 20px;
}
div.footer_desc div.descColumn{
width: 20%;
float: left;
padding-left: 15px;
}
div.footer_desc div.descColumn span.descColumnTitle{
color: #646464;
font-weight: bold;
font-size: 16px;
}
div.footer_desc a{
display: block;
padding-top: 3px;
}
body{
font-size: 12px;
font-family: Arial;
}
a{
color:#999;
}
a:hover{
text-decoration:none;
color: #C40000;
}
</style>
<div style="display: block;" class="footer" id="footer">
<div class="footer_ensure" id="footer_ensure">
<a href="#nowhere">
<img src="http://127.0.0.1/tmall../../../img/site/ensure.png">
</a>
</div>
<div class="footer_desc" id="footer_desc">
<div class="descColumn">
<span class="descColumnTitle">购物指南</span>
<a href="#nowhere">免费注册</a>
<a href="#nowhere">开通支付宝</a>
<a href="#nowhere">支付宝充值</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">天猫保障</span>
<a href="#nowhere">发票保障</a>
<a href="#nowhere">售后规则</a>
<a href="#nowhere">缺货赔付</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">支付方式</span>
<a href="#nowhere">快捷支付</a>
<a href="#nowhere">信用卡</a>
<a href="#nowhere">蚂蚁花呗</a>
<a href="#nowhere">货到付款</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">商家服务</span>
<a href="#nowhere">商家入驻</a>
<a href="#nowhere">商家中心</a>
<a href="#nowhere">天猫智库</a>
<a href="#nowhere">天猫规则</a>
<a href="#nowhere">物流服务</a>
<a href="#nowhere">喵言喵语</a>
<a href="#nowhere">运营服务</a>
</div>
<div class="descColumn">
<span class="descColumnTitle">手机天猫</span>
<a href="#nowhere"><img src="http://127.0.0.1/tmall../../../img/site/ma.png"></a>
</div>
</div>
<div style="clear:both"></div>
</div>
");
window.frames["iframe3171"].document.write(decodeHtml(code3171));
window.frames["iframe3171"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3171"]).load(function(){
$("#iframe3171").height($("#iframe3171").contents().find("body").height()+showittryitheight);
});
$("#iframe3171").height($("#iframe3171").contents().find("body").height()+showittryitheight);
alreadyWriteCode3171 = code3171;
$("#rendering3171").hide();
$("#rendered3171").show();
}
var tRereshRetry2DemoPanel3171 = setInterval(rereshRetry2DemoPanel3171,1000);
var binded3171 = false;
$("textarea#stepcodeTextarea3171").keyup(function(){
if(!binded3171){
$(window).bind('beforeunload',function(){
binded3171 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code3171 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code3171!=newCode){
// window.frames["iframe3171"].document.write("
");
// window.frames["iframe3171"].document.write(decodeHtml($("textarea#stepcodeTextarea3171").val()));
// window.frames["iframe3171"].document.close();
// $(window.frames["iframe3171"]).load(function(){
// $("#iframe3171").height($("#iframe3171").contents().find("body").height()+showittryitheight);
// });
// code3171 = newCode;
// }
});
$(".tryButton3171").click(function(){
$("#tryDiv3171").show();
$("#stepcodeTextarea3171").focus();
$("#stepcodeTextarea3171").height(200);
$("#iframe3171").height(0);
window.frames["iframe3171"].document.write("
");
window.frames["iframe3171"].document.write(decodeHtml($("textarea#stepcodeTextarea3171").val()));
window.frames["iframe3171"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3171"]).load(function(){
$("#iframe3171").height($("#iframe3171").contents().find("body").height()+showittryitheight);
});
$("#iframe3171").height($("#iframe3171").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor3171.focus();
editor3171.setSize(null, "250");
$("#rendering3171").hide();
$("#rendered3171").hide();
});
var mixedMode = {
name: "htmlmixed",
scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i,
mode: null},
{matches: /(text|application)\/(x-)?vb(a|script)/i,
mode: "vbscript"}]
};
var editor3171 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea3171"), {
lineNumbers: true,
styleActiveLine: true,
matchBrackets: true,
mode:"text/html",
theme:"eclipse",
selectionPointer: true,
lineWrapping: true,
extraKeys: {
"Alt-/": "autocomplete",
"Ctrl-F": "findPersistent",
"F8": function(cm) {
cm.setOption("fullScreen", !cm.getOption("fullScreen"));
},
"Esc": function(cm) {
if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false);
}
}
});
editor3171.on("change",function(doc){
if(!binded3171){
$(window).bind('beforeunload',function(){
binded3171 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code3171 = newCode;
$("textarea#stepcodeTextarea3171").val(newCode);
if(alreadyWriteCode3171!=code3171){
lastModifedTime3171 = new Date().getTime();
$("#rendering3171").show();
$("#rendered3171").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor3171 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor3171.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv3171").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
增值内容,请先登录
增值内容,请先登录
增值内容,请先登录
增值内容,请先登录
增值内容,请先登录
代码高亮插件双击即可选中,不过部分同学反应,通过代码高亮插件复制的代码无法在IDEA里正常显示,这里提供TEXTAREA的方式,方便复制,谢谢
1. 自行完成练习
根据练习目标尽量自己实现代码效果,期间会碰到疑问,难题,和自己不懂的地方,这些都是必要的过程
2. 带着疑问查看答案
完成过程中,碰到无法解决的问题,带着疑问,查看答案,分析答案的解决思路
3. 查看答案讲解视频
依然有不明白的地方,点开视频讲解,带着疑问,听视频讲解有问题的部分
4. 再做一遍
理解后,再从头做一遍,把有疑问的地方都捋清楚
5. 总结
最后再总结一遍,总结思路,总结解决办法,以后遇到类似的问题,怎么处理
HOW2J公众号,关注后实时获知布最新的教程和优惠活动,谢谢。
提问之前请登陆
|