This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--這次示範加兩張圖--> | |
<!--這行要加在最上面,加一次就好--> | |
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> | |
<script type="text/javascript"> | |
<!--以下是第一張圖的程式碼,要用<script>包住--> | |
google.charts.load('current', {'packages':['corechart']}); | |
google.charts.setOnLoadCallback(drawChart); | |
function drawChart() { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Add Analytics to AMP Pages | |
add_action('amp_post_template_footer','awtsamp_google_analytics'); | |
function awtsamp_google_analytics() { ?> | |
<amp-analytics type="googleanalytics" id="analytics1"> | |
<script type="application/json"> | |
{ | |
"vars": { | |
"account": "UA-XXXXX-Y" /*這邊改成你的google analytics ID*/ | |
}, | |
"triggers": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="video-container"> | |
<!-- 以下為Youtube的嵌入碼,不管width的設定多大,都會被CSS自動調整 --> | |
<!-- 如果覺得礙眼,也可以把width跟height都拿掉 --> | |
<iframe width="560" height="315" src="http://www.youtube.com/embed/S95J5BowMmk" frameborder="0" allowfullscreen> </iframe> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.video-container { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 30px; | |
height: 0; | |
overflow: hidden; | |
} | |
.video-container iframe, .video-container object, .video-container embed { | |
position: absolute; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="video-container"> | |
<!-- 以下為Youtube的嵌入碼,不管width的設定多大,都會被CSS自動調整 --> | |
<!-- 如果覺得礙眼,也可以把width跟height都拿掉 --> | |
<iframe width="560" height="315" src="http://www.youtube.com/embed/S95J5BowMmk" frameborder="0" allowfullscreen> </iframe> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.video-container { | |
position: relative; | |
padding-bottom: 56.25%; | |
padding-top: 30px; | |
height: 0; | |
overflow: hidden; | |
} | |
.video-container iframe, .video-container object, .video-container embed { | |
position: absolute; |