我的背景做问题如何解决?

时间:2018-12-21 09:39:05

标签: html css background background-image

我的主页有一些CSS代码,带有背景,并且没有显示我想要的代码。

背景显示在部分页面上,但不是全部页面上。

当我用CTRL & +放大时,它显示背景,但是当我重新加载页面时,它不显示背景。

我正在使用Google chrome及其在3页上出现的问题

body {
    font-family: VorT3eX Font;
    direction: rtl;
    height: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
    background-repeat: no-repeat;
    background-size:cover;
    background-attachment:fixed;
    background-image:url('Pictures/soccer___________d_1920x1080.jpg');
    overflow-x: hidden; 
}
@font-face {
    font-family: "VorT3eX Font";
    src: url("Fonts/aharoniclm-boldoblique-webfont.ttf");
}
@font-face {
    font-family: "VorT3eX Font2";
    src: url("Fonts/SecularOne-Regular.ttf");
}
@font-face {
    font-family: "VorT3eX Font3";
    src: url("Fonts/migdalfontwin-webfont.ttf");
}
#ContentPage
{
    font-family:VorT3eX Font2;
    height:auto;  
    width:951px;
    margin:auto;
    border:1.5px solid black;
    background-color:white;
}
#header {
    margin: auto;
    height: 40px;
    width: 951px;
    background-size:cover;
    background-attachment: scroll;
    background-position:center;
    border: 1.5px solid black;
    background-image:url("Pictures/370483.jpg");
}
nav
{
    overflow:hidden;
}

/*שלב ראשון*/
nav > ul 
{
    margin:0 auto;
    width:1000px;
}

nav ul li
{
   display:block;
   float:right;
   position:relative;

}

nav ul a
{
    display:block;
    width:150px;
    float:right;
    padding:10px 16px;

}   
/*שלב שני*/
nav ul li ul
{
    padding:0;
    margin:0;
    display:none;
    top:38px;
    position:fixed;
}
    nav ul li:hover > ul {
        display: block;
        background-image: url("Pictures/370483.jpg");
    }

nav ul li ul li
{
    float:none;
}
a
{
    color:White;
    text-decoration:none;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}
#Title
{
    font-family:VorT3eX Font;
    font-size:32.5px;
    text-align:center;
    text-decoration:underline;
    height: 35px;
    margin-top: 7px;
    color:gray;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 0.5px black;
}
#ContentText
{
    font-family:VorT3eX Font;
    color:black;
    font-size:18.5px;
}

我的SoccerPage出现背景问题,与母版页面的顶部CSS链接...

请帮助大家...

#Title
{
    font-family:VorT3eX Font;
    font-size:32.5px;
    text-align:center;
    text-decoration:underline;
    height: 35px;
    margin-top:7px;
    color:#4682B4;
    text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 0.5px black;
}
#Title1
{
    font-family:VorT3eX Font;
    color:black;
    font-size:21.5px;
}
#Picture1
{
    position:relative;
	left: -100px;
	bottom:-10px;
}
#ContentText1
{
    font-family:VorT3eX Font;
    color:black;
    font-size:15px; 
}
#Title2
{
    font-family:VorT3eX Font;
    color:black;
    font-size:21.5px;
}
#ContentText2
{
    font-family:VorT3eX Font;
    color:black;
    font-size:15px; 
}
#Picture2
{
    position:relative;
	left:-100px;
	bottom:-10px;
}
#Title3
{
    font-family:VorT3eX Font;
    color:black;
    font-size:21.5px;
}
#ContentText3
{
    font-family:VorT3eX Font;
    color:black;
    font-size:15px; 
}
#Picture3
{
    	position:relative;
	    left:-100px;
	    bottom:-15px;
}
#FinishText
{
    font-family:VorT3eX Font;
    color:black;
    font-size:15px; 
}
#FinishPicture
{
       position:absolute;
       margin-top:-100px;
}

2个我的SoccerPageCss(具有母版页)

MyProblem This how it need to looks like

1 个答案:

答案 0 :(得分:0)

尝试在代码中首先使用background-image功能。

body{
  background-image:url('Pictures/soccer___________d_1920x1080.jpg');
  background-repeat: no-repeat;
  background-size:cover;
  background-attachment:fixed;
}