开往   虫洞   统计
  • 文章总数:219 篇
  • 评论总数:5 条
  • 分类总数:7 个
  • 最后更新:6小时前

为typecho换个网页背景图

本文阅读 1 分钟
首页 建站代码 正文

HTML代码:

 <div id="mememe"></div>

CSS:

#mememe {
  background: url(你的图片地址);
  background-repeat: no-repeat;
  width: 100%;
  height: 100%;
  position: fixed;
  background-position: bottom right;
  bottom: 0;
  right: 0;
  z-index: -1
}

使用方法
就是吧css加到style.css 文件里面,然后HTML代码加到你需要的页面,比如我加到了
index.php
page-archives.php
page.php
post.php
(在这些页面的<?php $this->need('footer.php'); ?>前即可)

第二个是大背景

<body class="custom-background">

CSS:

body.custom-background { 
  background-image: url('你的地址'); 
  background-repeat: no-repeat;
  background-position: top left; 
  background-attachment: fixed;
  background-size:cover
}

使用方法
css加到style.css里面去,然后再 header.php 的的的class加入custom-background的样式即可!

本文来自投稿,不代表本站立场,如若转载,请注明出处:
-- 展开阅读全文 --
有所获,有所得,不负半夏时光
« 上一篇 06-09
简洁的可变透明度返回顶部按钮
下一篇 » 07-13

发表评论

发表评论
    请配置好页面缩略名选项

热门文章

标签TAG