-
Notifications
You must be signed in to change notification settings - Fork 0
/
ig.html
71 lines (69 loc) · 2.01 KB
/
ig.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
@import url('https://fonts.googleapis.com/css?family=Rubik');
@import url(http://fonts.googleapis.com/earlyaccess/notosanstc.css);
*{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
font-size: 100%;
font-family: "Rubik","Noto Sans TC",sans-serif;
}
.container{
width: 980px;
margin: 0 auto;
}
.item{
width: 300px;
height: 600px;
float: left;
border: 1px solid #eee;
text-align: center;
margin: 10px;
background: #eee;
}
p{
text-align: justify;
margin: 10px 20px;
padding: 10px;
}
img{
width: 280px;
height: 280px;
border: 3px solid #000;
padding: 10px;
margin-top: 20px;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<script>
$(function(){
var url = "https://api.instagram.com/v1/users/self/media/recent/";
$.ajax({
url:url,
dataType:"jsonp",
data:{
access_token:"1095584929.d3c156c.e27b1edffbb04cbc8d20f349d43c2e30",
count:20
},
success:function(e){
$(e.data).each(function(){
var c ="<div class='item'>";
c+="<img src='"+this.images.standard_resolution.url+"'>"
c+="<p>"+this.caption.text+"</p>"
c+="</div>"
$(".container").append(c);
});
}
})
})
</script>
</head>
<body>
<div class="container"></div>
</body>
</html>