本文及资源最后更新时间 2021-05-16 by sky995
占位代码怎么写,要想让别人知道这是一个广告位,前提是要稍微醒目一点,且还不能够太丑,所以,我们就分享几个广告位的占位代码来方便大家。
广告位占位代码 实例一:灰色虚线链接框
复制以下代码到主题设置-自定义代码-自定义css样式中
<code><span class="pln">a</span><span class="pun">.</span><span class="pln">tbaru</span><span class="pun">{</span><span class="pln">border</span><span class="pun">:</span><span class="lit">2px</span><span class="pln"> dashed </span><span class="com">#aaa;padding:40px 15px;font-size:14px;background-color:#fff;display:block;text-decoration:none;color:#888;font-weight:bold;text-align:center;}</span><span class="pln"> a</span><span class="pun">.</span><span class="pln">tbaru</span><span class="pun">:</span><span class="pln">hover</span><span class="pun">{</span><span class="pln">border</span><span class="pun">-</span><span class="pln">color</span><span class="pun">:</span><span class="com">#666;color:#444;}</span> <span class="lit">@media</span> <span class="pun">(</span><span class="pln">max</span><span class="pun">-</span><span class="pln">width</span><span class="pun">:</span><span class="lit">640px</span><span class="pun">){</span><span class="pln">a</span><span class="pun">.</span><span class="pln">tbaru</span><span class="pun">{</span><span class="pln">font</span><span class="pun">-</span><span class="pln">size</span><span class="pun">:</span><span class="lit">12px</span><span class="pun">;</span><span class="pln">padding</span><span class="pun">:</span><span class="lit">25px</span> <span class="lit">15px</span><span class="pun">;}}</span></code>
然后,复制以下代码到你需要显示的广告位代码框中,其中的中文字可按照自己需求修改
<code><span class="tag"><a</span> <span class="atn">class</span><span class="pun">=</span><span class="atv">"tbaru"</span> <span class="atn">href</span><span class="pun">=</span><span class="atv">"链接地址"</span> <span class="atn">target</span><span class="pun">=</span><span class="atv">"_blank"</span><span class="tag">></span><span class="pln">这是一个广告位,电脑和手机可分别设置</span><span class="tag"></a></span></code>
广告位占位代码 实例二:深灰底白色字链接块
复制以下代码到主题设置-自定义代码-自定义css样式中
<code><span class="pln">a</span><span class="pun">.</span><span class="pln">tbaru</span><span class="pun">{</span><span class="pln">padding</span><span class="pun">:</span><span class="lit">40px</span> <span class="lit">15px</span><span class="pun">;</span><span class="pln">font</span><span class="pun">-</span><span class="pln">size</span><span class="pun">:</span><span class="lit">14px</span><span class="pun">;</span><span class="pln">background</span><span class="pun">-</span><span class="pln">color</span><span class="pun">:</span><span class="com">#666;display:block;text-decoration:none;color:#fff;font-weight:bold;text-align:center;}</span><span class="pln"> a</span><span class="pun">.</span><span class="pln">tbaru</span><span class="pun">:</span><span class="pln">hover</span><span class="pun">{</span><span class="pln">border</span><span class="pun">-</span><span class="pln">color</span><span class="pun">:</span><span class="com">#555;color:#fff;}</span> <span class="lit">@media</span> <span class="pun">(</span><span class="pln">max</span><span class="pun">-</span><span class="pln">width</span><span class="pun">:</span><span class="lit">640px</span><span class="pun">){</span><span class="pln">a</span><span class="pun">.</span><span class="pln">tbaru</span><span class="pun">{</span><span class="pln">font</span><span class="pun">-</span><span class="pln">size</span><span class="pun">:</span><span class="lit">12px</span><span class="pun">;</span><span class="pln">padding</span><span class="pun">:</span><span class="lit">25px</span> <span class="lit">15px</span><span class="pun">;}}</span></code>
然后,复制以下代码到你需要显示的广告位代码框中,其中的中文字可按照自己需求修改
<code><span class="tag"><a</span> <span class="atn">class</span><span class="pun">=</span><span class="atv">"tbaru"</span> <span class="atn">href</span><span class="pun">=</span><span class="atv">"链接地址"</span> <span class="atn">target</span><span class="pun">=</span><span class="atv">"_blank"</span><span class="tag">></span><span class="pln">这是一个广告位,电脑和手机可分别设置</span><span class="tag"></a></span></code>
广告位占位代码 实例三:浅灰链接块
复制以下代码到主题设置-自定义代码-自定义css样式中
<code><span class="pln">a</span><span class="pun">.</span><span class="pln">tbaru</span><span class="pun">{</span><span class="pln">padding</span><span class="pun">:</span><span class="lit">40px</span> <span class="lit">15px</span><span class="pun">;</span><span class="pln">font</span><span class="pun">-</span><span class="pln">size</span><span class="pun">:</span><span class="lit">14px</span><span class="pun">;</span><span class="pln">background</span><span class="pun">-</span><span class="pln">color</span><span class="pun">:</span><span class="com">#f6f6f6;display:block;text-decoration:none;color:#aaa;font-weight:bold;text-align:center;}</span><span class="pln"> a</span><span class="pun">.</span><span class="pln">tbaru</span><span class="pun">:</span><span class="pln">hover</span><span class="pun">{</span><span class="pln">border</span><span class="pun">-</span><span class="pln">color</span><span class="pun">:</span><span class="com">#eee;color:#666;}</span> <span class="lit">@media</span> <span class="pun">(</span><span class="pln">max</span><span class="pun">-</span><span class="pln">width</span><span class="pun">:</span><span class="lit">640px</span><span class="pun">){</span><span class="pln">a</span><span class="pun">.</span><span class="pln">tbaru</span><span class="pun">{</span><span class="pln">font</span><span class="pun">-</span><span class="pln">size</span><span class="pun">:</span><span class="lit">12px</span><span class="pun">;</span><span class="pln">padding</span><span class="pun">:</span><span class="lit">25px</span> <span class="lit">15px</span><span class="pun">;}}</span></code>
然后,复制以下代码到你需要显示的广告位代码框中,其中的中文字可按照自己需求修改
<code><span class="tag"><a</span> <span class="atn">class</span><span class="pun">=</span><span class="atv">"tbaru"</span> <span class="atn">href</span><span class="pun">=</span><span class="atv">"链接地址"</span> <span class="atn">target</span><span class="pun">=</span><span class="atv">"_blank"</span><span class="tag">></span><span class="pln">这是一个广告位,电脑和手机可分别设置</span><span class="tag"></a></span></code>