ทำอย่างไรให้แอดเซ้นสแสดงในการดูแบบมือถือครับ

เริ่มโดย natdanai, 12 พฤษภาคม 2018, 21:42:39

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

natdanai

อ้างถึงจาก: newbie-pro ใน 18 พฤษภาคม 2018, 10:48:47
เอาโค๊ดนี้ไปแปลงเอานะครับ อยากให้แสดงขนาดไหน หรือไม่ให้แสดงในอุปกรณ์ใหญ่เล็กแค่ไหนก็ได้

คงอ่านโค๊ดออกนะครับ


<style>
.link_1 { display:inline-block; width: 320px; height: 50px; }
@media (max-width: 319px) { .link_1 { display: none; } }
@media (min-width:480px) { .link_1 { width: 468px; height: 15px; } }
@media (min-width:800px) { .link_1 { width: 728px; height: 15px; } }
</style>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

<ins class="adsbygoogle link_1"
     style="display:inline-block"
     data-ad-client="ca-pub-xxxxxxxxxxxxxx"
     data-ad-slot="xxxxxxxxxx"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

ขอบคุณครับ

natdanai