gpt4 book ai didi

html - 每次我调整大小时,文本都会覆盖图像,无论我做什么,它都会与 Logo 重叠

转载 作者:太空宇宙 更新时间:2023-11-04 12:17:01 25 4
gpt4 key购买 nike

已经对它为什么这样做做了一些研究,但是,我似乎无法解决这个问题。标题 Logo /文本保持重叠。有人知道为什么要这样做吗?

http://jsfiddle.net/uljima/bcm96v49/

调整大小:

http://i.stack.imgur.com/l2P3z.png

尝试了很多东西,但它一直与 Logo 重叠。

HTML:

<html>
<header>
<title>KeyStone Coffee</title>
<link rel="stylesheet" href="styles/styles.css">
<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Anton' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
</style>
</head>
<div class="wrapper">
<body>
<body>
<header>

<div class= "Company_Logo">
<a href="http://imgur.com/Qu8f4K3"><img src="http://i.imgur.com/Qu8f4K3.png" title="source: imgur.com" alt="Company Logo" height="200" width="200"/></a>
</div>

<center>
<div class= "Company_Text">
<h1>Keystone Coffee</h1>
</div>
</center>

<div class="HPFGAC">
<nav>
<ul>
<center>
<li><a href = "index.html">HOME</a></li>
<li><a href = "Products/Products.html">PRODUCTS</a></li>
<li><a href = "#">FLAVORED COFFEE</a></li>
<li><a href = "#">GUIDE TO THE PERFECT TASTE</a></li>
<li><a href = "#">ABOUT</a></li>
<li><a href = "#">CONTACT</a></li>
</center>
</ul>
</nav>
</div>
</html>
</header>

CSS:

#wrapper {
height: 850px;
width: 960px;
margin:0 auto;
background-repeat: no-repeat;
background-position: center center;

}

.row:after{
clear: both;
}
.col{
background: black;
border-radius: 5px;
color: white;
padding: .5px;
float: left;
margin: 1%;
width: 100%;
}
.row:after{
clear: both;
}

.col{
background: black;
border-radius: 5px;
color: white;
padding: .5px;
float: left;
margin: 1%;
width: 100%;
}
.WebContainer{
width: 100%;
height: auto;
}
.articles{
width:90%;
height: auto;
margin: auto;
}

.DIV
{
margin-left:0px;
margin-right:0px;
}
.box2 {
display: inline-block;
width: 100%;
height: 100px;
margin: 1em;
}
html{
overflow: scroll;
height: 100%;
margin: auto;
width:100%;
}
body {
height: 960px;
margin: 0;
padding:0;
width:100%;
text-align:center;
}
header {
background: white;
color: Black;
padding: 0px 15px 15px 15px;
float: center-side;
margin-left: auto;
margin-right: auto;
}
header h1 {
margin: 0px;
display: inline;
float: center-side;
margin-left: auto;
margin-right: auto;
}
nav ul{
margin: 0px;
padding : 0 0 15px 0;
display: inline;
float: center-side;
margin-left: auto;
margin-right: auto;
}
nav ul li{
background: wwhite;
color: #9D795B;
display: inline-block;
list-style-type: none;
padding: 5% 15px 20px 15px;
margin: 0;
float: center-side;
margin-left: auto;
margin-right: auto;
font-size: 1.875em;
white-space:nowrap;
}
nav ul li a {
color: #9D795B;
float: center-side;
margin-left: auto;
margin-right: auto;
}
.Company_Logo{
float:center-left
clear: both;
position: absolute;
top: 0%;
right: 70.5%;
z-index: 9999;
display: block;
white-space:nowrap;
padding: 2px 2px 2px 2px;
}
.Company_Logo{
width:100px;
}
.Company_Text{
clear: both;
color:#9D795B;
font-size:50.5px;
font-family: 'Lobster', cursive;
display: inline;
white-space:nowrap;
}

.Company_Text{
clear: both;
position: relative;
top: 35px;
right: -2.75%;
z-index: 9999;
}

.HPFGAC{
clear: both;
font-family: 'Anton', sans-serif;
white-space:nowrap;

}
.HPFGAC a:link {
text-decoration: none;
}

.HPFGAC a:visited {
text-decoration: none;
}

.HPFGAC a:hover {
text-decoration: underline;
}

.HPFGAC a:active {
text-decoration: underline;
}

最佳答案

不错的尝试,但我必须说你需要对你的代码进行一些实际的工作,它非常困惑。

HTML

    <title>KeyStone Coffee</title>
<link rel="stylesheet" href="styles/styles.css">
<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Anton' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
</style>
</head>
<div class="wrapper">

<body>

<body>
<header>
<div class="Company_Logo"> <a href="http://imgur.com/Qu8f4K3"><img src="http://i.imgur.com/Qu8f4K3.png" title="source: imgur.com" alt="Company Logo" height="200" width="200"/></a>

</div>
<center>
<div class="Company_Text">
<h1>Keystone Coffee</h1>

</div>
</center>
<div class="HPFGAC">
<nav>
<ul>
<center>
<li><a href="index.html">HOME</a>

</li>
<li><a href="Products/Products.html">PRODUCTS</a>

</li>
<li><a href="#">FLAVORED COFFEE</a>

</li>
<li><a href="#">GUIDE TO THE PERFECT TASTE</a>

</li>
<li><a href="#">ABOUT</a>

</li>
<li><a href="#">CONTACT</a>

</li>
</center>
</ul>
</nav>
</div>

CSS

 #wrapper {
height: 850px;
width: 960px;
margin:0 auto;
background-repeat: no-repeat;
background-position: center center;
}
.row:after {
clear: both;
}
.col {
background: black;
border-radius: 5px;
color: white;
padding: .5px;
float: left;
margin: 1%;
width: 100%;
}
.row:after {
clear: both;
}
.col {
background: black;
border-radius: 5px;
color: white;
padding: .5px;
float: left;
margin: 1%;
width: 100%;
}
.WebContainer {
width: 100%;
height: auto;
}
.articles {
width:90%;
height: auto;
margin: auto;
}
.DIV {
margin-left:0px;
margin-right:0px;
}
.box2 {
display: inline-block;
width: 100%;
height: 100px;
margin: 1em;
}
html {
overflow: scroll;
height: 100%;
margin: auto;
width:100%;
}
body {
height: 960px;
margin: 0;
padding:0;
width:100%;
text-align:center;
}
header {
background: white;
color: Black;
padding: 0px 15px 15px 15px;
float: center-side;
margin-left: auto;
margin-right: auto;
}
header h1 {
margin: 0px;
display: inline;
float: center-side;
margin-left: auto;
margin-right: auto;
}
nav ul {
margin: 0px;
padding : 0 0 15px 0;
display: inline;
float: center-side;
margin-left: auto;
margin-right: auto;
}
nav ul li {
background: wwhite;
color: #9D795B;
display: inline-block;
list-style-type: none;
padding: 5% 15px 20px 15px;
margin: 0;
float: center-side;
margin-left: auto;
margin-right: auto;
font-size: 1.875em;
white-space:nowrap;
}
nav ul li a {
color: #9D795B;
float: center-side;
margin-left: auto;
margin-right: auto;
}
.Company_Logo {
float: left;
padding: 2px 2px 2px 2px;
}
header center{
overflow: hidden;
}
.Company_Text {
padding-top: 30px;
color:#9D795B;
text-align: left;
font-size:50.5px;
font-family:'Lobster', cursive;
white-space:nowrap;
}
.HPFGAC {
clear: both;
font-family:'Anton', sans-serif;
white-space:nowrap;
}
.HPFGAC a:link {
text-decoration: none;
}
.HPFGAC a:visited {
text-decoration: none;
}
.HPFGAC a:hover {
text-decoration: underline;
}
.HPFGAC a:active {
text-decoration: underline;
}

链接到 Fiddle

我希望这对您有所帮助,干杯。

关于html - 每次我调整大小时,文本都会覆盖图像,无论我做什么,它都会与 Logo 重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28623376/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com