針對淘寶/拍拍等平台自助裝修,整理最常用的 HTML 代碼片段,無需程式基礎即可套用。所有圖片、音樂需先上傳至網路相簿取得直連。
<img src="圖片直連" alt="說明" />
<img src="裝飾圖直連" style="position:relative; left:20px; top:0;" />
<bgsound loop="-1" src="音樂直連"></bgsound>
<!-- 僅 IE 支援,現代瀏覽器請用 <audio> -->
<audio src="音樂直連" autoplay loop hidden></audio>
<img border="0" src="圖片直連" dynsrc="音樂直連">
<img src="圖片直連" align="left" hspace="10" vspace="10" />
<!-- 或 CSS: style="float:left; margin:0 10px 10px 0;" -->
<a href="目標網址" target="_blank">連結文字</a>
<marquee direction="left" scrollamount="3" onmouseover="this.stop()" onmouseout="this.start()">
向左捲動的文字內容
</marquee>
注意:<marquee> 為非標準標籤,現代專案建議用 CSS Animation 實現。
<img src="圖片直連" style="position:fixed; right:20px; top:50%; transform:translateY(-50%); z-index:9999;" />
<button style="background:#ff6600; color:#fff; border:none; padding:8px 16px; border-radius:4px; cursor:pointer;">立即購買</button>
script、style、iframe 等標籤,僅支援內聯 style。