欢迎来到好人卡资源网,专注网络技术资源收集,我们不仅是网络资源的搬运工,也生产原创资源。寻找资源请留言

分享几个通用的网站广告位占位/招租的代码实例

网站源码 sky995 1年前 (2021-05-16) 277次浏览 0个评论

占位代码怎么写,要想让别人知道这是一个广告位,前提是要稍微醒目一点,且还不能够太丑,所以,我们就分享几个广告位的占位代码来方便大家。


广告位占位代码 实例一:灰色虚线链接框

复制以下代码到主题设置-自定义代码-自定义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>

好人卡资源网 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:分享几个通用的网站广告位占位/招租的代码实例
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址