เมื่อหน้าตาเป็นเรื่องจำเป็นสำหรับการสร้างโปรแกรมให้คนอื่นๆใช้งาน ดังนั้นวันนี้จึงมานำเสนอเทคนิคของฝรั่งในการเอา File gif animation มาใช้งานกันครับ
หลักๆที่จะต้องมีก็คือการเข้ารหัส file gif แล้วเรียกไปแสดงผลใน html ก็เท่านั้นนะครับ
อย่างแรก เราต้องไปหา file gif ก่อน เข้า google แล้วค้นหา gif animation เลยหรือจะไปที่ pinterest.com ก็ได้ครับ แหล่งรวมเลย
เมื่อได้แล้ว ก็จัดการสร้าง table เพื่อ upload รูปเข้ามาใน file maker ตรงนี้รบกวนดู video ประกอบนะครับ เขียนไปยาวยืดอาจจะไม่เข้าใจ
หัวใจของการแสดงผลคือ code html ด้านล่าง สำหรับทำเป็น custom function นะครับ copy ได้เลย
"data:text/html,
<html>
<head>
<style type=\"text/css\">
div.container {
top: 0; left: 0;
width: 100%;
height: 100%;
position: fixed;
display: table
}
p {
display: table-cell;
vertical-align: middle
}
img.displayed {
display: block;
margin: 0em auto}
p {
text-align: center
}
</style>
</head>
<body style='border: 0; margin: 0';>
<div class=\"container\">
<p><img src=\"data:image/gif;base64," & base64 & "\"></p>
</div>
</body>
</html>"
ขอให้สนุกสนานครับ