我在顯示標題上的整個圖像時遇到問題。我試過包含和封面,沒有一週,任何幫助將不勝感激。這裏是我的問題和代碼的截圖。 在標題上顯示圖像的完整大小[CSS]
body {
font-family: 'Roboto';
color:#464655;
background-color: #E5E0CD;
outline:none;}
a {text-decoration: none;}
h1{
font-family:"SummerHearts-Regular";
font-size:30px;
text-align:center;
letter-spacing:16px;}
#cd-intro {
background: url(trees.jpg) no-repeat center center fixed;
z-index: 2;
margin: 0 auto;
display:block;
background-size:100% 170px;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;}
#cd-intro #cd-intro-tagline {
width: auto;
width:90%;
position:relative;
max-width: 1170px;
margin: 0 auto;
text-align: center;
padding-top: 20px;}
@media only screen and (min-width: 1170px) {
#cd-intro {
height: 170px;
}
#cd-intro #cd-intro-tagline {
padding-top: 5px;
}
#cd-intro input {
font-size: 50px;
}
}
.cd-btn {
display: inline-block;
padding: 1em 1.8em;
background-color:#D23C69;
border-radius: 5px;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #E5E0CD;
}
<html>
<body>
<header>
<section id="cd-intro">
<div id="cd-intro-tagline">
<img src="C:\Users\Maryam\Desktop\TravelGeni\Trip\css\Travel Geni.png" alt="Mountain View" style="width:110px;left:-80px;top:0;position:absolute;">
<h1 style="top:0;">Edit Trip</h1>
<a href="" class="cd-btn">Delete</a>
<a href="" class="cd-btn">Mark Complete</a>
</div> <!-- #cd-intro-tagline -->
</section> <!-- #cd-intro -->
</header>
</body>
</html>
你要解釋,更好,因爲我不知道你問什麼。相反,如果你想從你的原始圖像中獲得圖像,那麼它清楚地顯示出 – LGSon