<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<table class="table table-bordered">
<tr>
<th>-webkit- </th>
<td>(<span class="text-danger">Chrome, Safari</span>, newer versions of <span class="text-danger">Opera</span>, almost all iOS browsers (including <span class="text-danger">Firefox for iOS</span>); basically, any WebKit based browser)</td>
</tr>
<tr>
<th>-moz- </th>
<td>(<span class="text-danger">Firefox</span>)Gecko核心</td>
</tr>
<tr>
<th>-o- </th>
<td>(Old, pre-WebKit, versions of <span class="text-danger">Opera</span>)</td>
</tr>
<tr>
<th>-ms- </th>
<td>(<span class="text-danger">Internet Explorer</span> and <span class="text-danger">Microsoft Edge</span>)</td>
</tr>
</table>
</body>
</html>
Jerry 發表在 痞客邦 留言(0) 人氣(15)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<table class="table table-bordered">
<tr>
<th>-webkit- </th>
<td>(<span class="text-danger">Chrome, Safari</span>, newer versions of <span class="text-danger">Opera</span>, almost all iOS browsers (including <span class="text-danger">Firefox for iOS</span>); basically, any WebKit based browser)</td>
</tr>
<tr>
<th>-moz- </th>
<td>(<span class="text-danger">Firefox</span>)Gecko核心</td>
</tr>
<tr>
<th>-o- </th>
<td>(Old, pre-WebKit, versions of <span class="text-danger">Opera</span>)</td>
</tr>
<tr>
<th>-ms- </th>
<td>(<span class="text-danger">Internet Explorer</span> and <span class="text-danger">Microsoft Edge</span>)</td>
</tr>
</table>
</body>
</html>
Jerry 發表在 痞客邦 留言(0) 人氣(0)
/*資料夾結構*/
├─data
│ data.html
0909ajax_html.html
Jerry 發表在 痞客邦 留言(0) 人氣(0)
/*資料夾結構*/
├─data
│ data.html
0909ajax_html.html
Jerry 發表在 痞客邦 留言(0) 人氣(21)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<style type="text/css">
#box{
padding: 50px;
background-color: #088;
display: inline-block;
margin: 50px;
position: absolute;
}
#child{
width: 100px;
height: 100px;
background-color: #08f;
}
#ground{
height: 300px;
width: 100px;
}
</style>
</head>
<body>
<div id="box">
<div id="child"></div>
</div>
<div id="ground"></div>
<script type="text/javascript">
$('#ground').after(
'<h2>小孩離螢幕左上角左距'+$('#child').offset().left+'</h2>'+
'<h2>小孩離螢幕左上角上距'+$('#child').offset().top+'</h2>'+
'<h2>小孩離父親左上角上距'+$('#child').position().top+'</h2>'+
'<h2>小孩離父親左上角上距'+$('#child').position().left+'</h2>');
</script>
</body>
</html>
Jerry 發表在 痞客邦 留言(0) 人氣(0)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<style type="text/css">
#box{
padding: 50px;
background-color: #088;
display: inline-block;
margin: 50px;
position: absolute;
}
#child{
width: 100px;
height: 100px;
background-color: #08f;
}
#ground{
height: 300px;
width: 100px;
}
</style>
</head>
<body>
<div id="box">
<div id="child"></div>
</div>
<div id="ground"></div>
<script type="text/javascript">
$('#ground').after(
'<h2>小孩離螢幕左上角左距'+$('#child').offset().left+'</h2>'+
'<h2>小孩離螢幕左上角上距'+$('#child').offset().top+'</h2>'+
'<h2>小孩離父親左上角上距'+$('#child').position().top+'</h2>'+
'<h2>小孩離父親左上角上距'+$('#child').position().left+'</h2>');
</script>
</body>
</html>
Jerry 發表在 痞客邦 留言(0) 人氣(1)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<style type="text/css">
#box{
width: 100px;
height: 100px;
background-color: #f88;
border: 50px solid #88f;
margin: 50px;
padding: 50px;
}
</style>
</head>
<body>
<div id="box">我是內容</div>
<script type="text/javascript">
$('#box').after(
'<h2>內容長寬為'+$('#box').width()+'x'+$('#box').height()+'</h2>'+
'<h2>含padding長寬為'+$('#box').innerWidth()+'x'+$('#box').innerHeight()+'</h2>'+
'<h2>含邊框長寬為'+$('#box').outerWidth()+'x'+$('#box').outerHeight()+'</h2>'+
'<h2>含margin長寬為'+$('#box').outerWidth(true)+'x'+$('#box').outerHeight(true)+'</h2>'
);
</script>
</body>
</html>
Jerry 發表在 痞客邦 留言(0) 人氣(0)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<style type="text/css">
#box{
width: 100px;
height: 100px;
background-color: #f88;
border: 50px solid #88f;
margin: 50px;
padding: 50px;
}
</style>
</head>
<body>
<div id="box">我是內容</div>
<script type="text/javascript">
$('#box').after(
'<h2>內容長寬為'+$('#box').width()+'x'+$('#box').height()+'</h2>'+
'<h2>含padding長寬為'+$('#box').innerWidth()+'x'+$('#box').innerHeight()+'</h2>'+
'<h2>含邊框長寬為'+$('#box').outerWidth()+'x'+$('#box').outerHeight()+'</h2>'+
'<h2>含margin長寬為'+$('#box').outerWidth(true)+'x'+$('#box').outerHeight(true)+'</h2>'
);
</script>
</body>
</html>
Jerry 發表在 痞客邦 留言(0) 人氣(47)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<style type="text/css">
#box{
width: 100px;
height: 100px;
background-color: #fb0;
margin: 10px 0;
}
</style>
</head>
<body>
<div id="box"></div>
<button id="btn">刪掉</button>
<button id="btn2">復原</button>
<script type="text/javascript">
var x;
$('#btn').on('click',function(){
x = $('#box').detach();
});
$('#btn2').on('click',function(){
$('#btn').before(x);
});
</script>
</body>
</html>
Jerry 發表在 痞客邦 留言(0) 人氣(25)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<style type="text/css">
#box{
width: 100px;
height: 100px;
background-color: #fb0;
margin: 10px 0;
}
</style>
</head>
<body>
<div id="box"></div>
<button id="btn">刪掉</button>
<button id="btn2">復原</button>
<script type="text/javascript">
var x;
$('#btn').on('click',function(){
x = $('#box').detach();
});
$('#btn2').on('click',function(){
$('#btn').before(x);
});
</script>
</body>
</html>
Jerry 發表在 痞客邦 留言(0) 人氣(0)