我已經在我的新wordpress博客中安裝了一個完全沒有CSS的空白主題。我一直在試圖給它一個背景圖片,但沒有成功。它與PHP和css for wordpress博客相關
我正在處理博客的內容。博客是非常新的。所以,直到內容準備就緒後,我只想要一個背景圖片出現在我的博客上,並在頁面中間有一些文字。
我從footer.php中刪除了內容,我刪除了當Wordpress第一次涉及時看到的默認文章。我刪除了searchform中的內容。 PHP也是。我想一段時間都空着。只需要一個BG圖像和一些顯示在我博客中間的文字。
我在空白主題的style.css中添加了這行。不工作。另外,我在哪裏添加文字,以便它顯示在中心?
body { background: url('http://mysite.com/wp-content/uploads/2012/03/myIMG.jpg')
有人可以幫我出來嗎?
我對PHP一無所知,所以我不知道要在哪裏添加文本。請幫幫我。我應該添加哪些php文本?而且這個背景圖片還沒有工作。我現在將「背景」更改爲「背景圖像」
這是我的Wordpress博客中截至目前唯一的css文件..我一直只對此進行更改。
/*
Theme Name: BlankSlate
Theme URI: http://tidythemes.com/blankslate/
Description: BEFORE USING AND ESPECIALLY UPGRADING PLEASE READ: tidythemes.com/concept. The bare essentials of a WordPress theme, no visual CSS styles added. Perfect for those who would like to build their own theme from scratch or for clients if you're a developer or designer. This theme is clean, valid code, semi minified, no programmer comments, SEO-friendly and 100% open source. One custom menu and one widgetized sidebar to get you started. If you don't know CSS and would like to learn we've prepared: tidythemes.com/want-to-learn-css and please visit us in the forum for further help: tidythemes.com/forum - Thank You and Enjoy
Author: TidyThemes
Author URI: http://tidythemes.com/
Version: 2.0
Tags: custom-menu, featured-images, microformats, sticky-post, threaded-comments
License: GNU General Public License v2.0 | From TidyThemes: This theme is completely free and open source to use as you like for both personal and commercial projects without any limitations.
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
body { background-image: url('http://mysite.com/wp-content/uploads/2012/03/myIMG.jpg') !important; no-repeat}
body { text-align: center !important;}
html{ margin-top:0px !important;}
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{font-size:100%;font:inherit;padding:0;border:0;margin:0;vertical-align:baseline}
body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}
.sticky{}
.bypostauthor{}
.wp-caption{}
.wp-caption-text{}
.gallery-caption{}
.alignright{}
.alignleft{}
.aligncenter{}
thnx!它工作:)),但我的背景圖像即將平鋪。我如何居中這個BG圖像? ALSO PLZ告訴我如何添加文本? – Infinity 2012-03-22 07:04:16
如果你不想重複只使用'不重複',並放在中心使用'中心頂部' – Dips 2012-03-22 07:07:08
我檢查了我的博客使用螢火蟲..它有這行html { margin-top:28px!important; }我如何擺脫這個?我不想要這個保證金 – Infinity 2012-03-22 07:10:04