- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用 HTML/CSS 从头开始创建我的第一个网站。我遇到的问题是我在页面上的文本超出了背景图像的边界,当我向下滚动时,容器 (.violence) 似乎停止显示线性渐变并移动到白色背景。有什么方法可以扩展和调整渐变以匹配我输入的文本量?
提前致谢。
我曾尝试在网上搜索解决方案,但我缺乏对 HTML/CSS 的知识和理解,因此无法解决问题。
* {
margin: 0;
padding: 0;
}
header {
background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(background.jpg);
height: 100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: 100%;
}
.main-nav {
float: right;
list-style: none;
margin-top: 30px;
}
.main-nav li {
display: inline-block;
}
.main-nav li a {
color: white;
text-decoration: underline;
padding: 5px 10px;
font-family: "Trajan Pro", sans-serif;
font-size: 15px;
}
.main-nav li.active a {
border: 1px solid white;
}
.main-nav li a:hover {
border: 1px solid white;
}
.logo img {
width: 150px;
height: auto;
float: left;
}
body {
font-family: monospace;
}
.row {
max-width: 1200px;
margin: auto;
}
.welcome {
position: absolute;
width: 1200px;
margin-left: 375px;
margin-top: 425px;
}
h1 {
color: white;
font-family: "Trajan Pro", sans-serif;
font-size: 50px;
text-align: center;
margin-top: 0px;
}
h2 {
color: white;
font-family: "Trajan Pro", sans-serif;
font-style: italic;
font-size: 22px;
text-align: center;
margin-top: 0px;
}
.violence {
position: absolute;
width: 1200px;
margin-left: 375px;
margin-top: 75px;
}
h3 {
color: white;
font-family: "Trajan Pro", sans-serif;
font-style: italic;
font-size: 20px;
text-align: center;
margin-top: 0px;
}
h4 {
color: white;
font-family: "Trajan Pro", sans-serif;
font-size: 15px;
text-align: left;
margin-top: 25px;
}
h5 {
color: white;
font-family: "Trajan Pro", sans-serif;
font-style: italic;
font-size: 20px;
text-align: center;
margin-top: 0px;
}
h6 {
color: white;
font-family: "Trajan Pro", sans-serif;
font-size: 15px;
text-align: left;
margin-top: 0px;
}
h7 {
color: white;
font-family: "Trajan Pro", sans-serif;
font-style: italic;
font-size: 20px;
text-align: center;
margin-top: 0px;
}
h8 {
color: white;
font-family: "Trajan Pro", sans-serif;
font-size: 15px;
text-align: left;
margin-top: 0px;
}
h9 {
color: white;
font-family: "Trajan Pro", sans-serif;
font-style: italic;
font-size: 20px;
text-align: center;
margin-top: 0px;
}
<html>
<head>
<title>The Quest for Arrakis: The Second Imperial Renaissance</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<header>
<div class="row">
<div class="logo">
<img src="logo.png">
</div>
<ul class="main-nav">
<li><a href="home.html"> HOME </a></li>
<li class="active"><a href="setting.html"> GAME SETTING </a></li>
<li><a href=""> CHARACTERS AND ENTITIES </a></li>
<li><a href=""> WRITING SAMPLES </a></li>
<li><a href=""> GAME FEATURES </a></li>
<li><a href=""> JOIN </a></li>
<li><a href=""> CONTACT US </a></li>
</ul>
</div>
<div class="violence">
<h3>
<p>"There is no escape—we pay for the violence of our ancestors." <br>- Frank Herbert, Dune</p>
</h3>
<h4>
<p>Quest for Arrakis II continues the decade long history and political machinations of the original Quest for Arrakis. It is an intense setting that stays true to the canon as set forth by Frank Herbert and focuses primarily on power politics and
grand story telling. Much like the in the novels most anything is possible…if the player is willing to pay the right price.</p><br>
<p>The setting is an alternative universe to the world as designed by Frank Herbert and taking place some twelve centuries before the time of Paul Atreides. The Corrino Empire has suffered through a devastating war which has taken the life of the
previous Emperor and plunged the human race into a period of economic collapse and massive social unrest. Old houses have fallen or been reduced in power leaving a vacuum for the ambitious to make a name for themselves. Under the watchful eye
of a new soverign the Empire begins the long road back to prosperity. New houses seek to establish themselves as old ones try to return to glory.</p><br>
<p>We offer an intense gaming atmosphere with motivated players, helpful staff and well detailed game environment. Everything is story driven and the opportunities are endless for writers willing to be active. Will you raise your banner in this brave
new age? The perils are daunting and the road will be hard but do you have what it takes to rise to power in the Quest for Arrakis II?</p>
<h5><br>
<p>"Beginnings are such delicate times." <br>-Princess Irulan</p>
</h5>
<h6><br>
<p>In the Year 8760 A.G., The Imperium has emerged from a devestating conflict known as The Second Muadru Incursion. Houses have fallen, and widespread economic collapse have devastated the fortunes of the Houses of the Imperium. As the Empire
returns to glory beneath the Rule of Padishah-Emperor Ezhar the Seventh, Houses New and Old seek to stablise themselves in a turbulent epoch of Imperial History with plenty of opportunity to do so.</p>
</h6>
<h7><br>
<p>"Control the coinage and the courts - let the rabble have the rest." Thus the Padishah Emperor advises you. And he tells you; "If you want profits, you must rule." There is truth in these words, but I ask myself: "Who are the rabble and who
are the ruled?"<br>-Princess Irulan</p>
</h7>
<h8>
<p><br>The Quest for Arrakis II offers many paths to power.</p>
<p><br>The Landsraad acts as the Political Hub of the Imperium with the Houses and Players generating most of our Game's Laws and Rule Sets.</p>
<p><br>If economics piques your interest, then CHOAM serves as the legislature that defines the economic fortunes of the Empire with its Board of Directors governing In Character Policy.</p>
<p><br>If it is the Favour of the Corrino that drives your ambitions, then the Court of the Emperor will provide you with the opportunity to make a name and reputation for yourself beneath the watchful eye of the Emperor.
<p><br>Regardless of the path you choose, all roads leads to Arrakis and the fortunes that lie hidden beneath its sands, guarded by Fremen and Worm alike. The journey will not be easy but with enough patience, perseverance and determination,
you may one day rule the Desert Planet and harness the riches and power for yourself!</p>
</h8>
<h9>
<p><br>"One must always keep the tools of statecraft sharp and ready. Power and fear –sharp and ready." <br>- Baron Vladimir Harkonnen</p>
</h9>
</div>
</header>
</body>
</html>
我希望文本继续可见。
最佳答案
你的问题太模糊了,但我还是试过了,所以这是我给你的答案。你应该将 background-image 属性应用于暴力类本身而不是标题类。
我知道您是 HTML/CSS 的新手,但您应该在网上查看优质资源以学习语言和最佳实践。您的代码有非常基本的错误,这些错误不应该出现。
<h1>
至 <h6>
但是您使用了超出 HTML 无法识别或支持的标题标签。<h3>
之外的所有标题标签。这实际上用作标题。关于html - 在 HTML/CSS 中寻求有关文本溢出/线性渐变的帮助,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56607363/
是否可以使用 av_seek_frame() 函数查找 I-Frame。 我面临的问题是,如果我在 AVC 文件中查找,如果我不刷新缓冲区,我会收到很多噪音。如果我刷新缓冲区,解码器不会返回一个帧,直
在我处理 SL3/SL4 应用程序并开始使用字体时,我发现缺乏有关字体策略的文档和最佳实践。例如: 是否有常见的后备字体 支持的字体集(Arial、Comic 无 MS 等)?是否有一组关于 Wind
是否有一个我可以运行而什么都不做(或很少做)而永远不会出错的命令? 我需要一些东西来测试海豚。 最佳答案 注释什么都不做(但如果根本没有命令,您的数据库驱动程序可能会提示): /* Hello, wo
我正在寻找与 Delphi (7) 一起使用的 FOSS SHA1 实现。 最好是一些小的东西,甚至可能是独立的 SHA1,而不是过去的一个巨大的库。易于安装和使用固然很好,但可靠性当然是第一位的。
团队, 我是 Azure 的初学者,对 Blob 存储日志有一些疑问 我指的是这个链接http://blogs.msdn.com/b/windowsazurestorage/archive/201
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭10 年前。 Improve th
我在周末发现了 Akavache,它看起来是一个强烈推荐的用于在 Win8 和 WP8 上缓存项目的解决方案。 但是,我找不到任何实际示例或如何使用它的文档! 有人可以分享任何示例项目或文档吗? 最佳
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 8 年前。 Improve this ques
Delphi XE2 和 MySql。 我的 previous question导致建议我应该使用 MySql 的 native TIMESTAMP 数据类型来存储日期/时间。 不幸的是,我似乎找不到
DDX 技术是为将资源与类成员链接起来而创建的(例如)。在我的解决方案中,我需要在不存在于类成员 CCtreeCtrl 的资源中的 myCCtreeCtrl(CCtreeCtrl 实例)之间建立连接。
我遇到了这个问题: A shoemaker has N jobs (orders from customers) to execute. The shoemaker can work on only
typedef union { float flts[4]; struct { GLfloat r; GLfloat theta; GL
我有两个我想组合的以下形状的数组。 数组: arr1 = [["apple", "aardvark"], ["banana", "beach"]] arr2 = ['A', 'B'] 期望的结果: [
这个问题已经asked before , 但每次接受的答案只是辞职,使用 Application.MacroOptions ( VBA6 ) ( VBA7 ) 提供功能描述,但此信息实际上并未显示为工
如标题所述,-ss命令不适用于某些设备,例如华为 Mate 10。 这是我正在使用的命令以及如何获取值: Format formatter = new SimpleDateFormat("00:" +
我被指派负责修订当前的报告服务身份验证流程。目的是保持必要的安全级别,并简化授予对各个报告的访问权限的维护/配置。 我无权访问域 Controller 以修改或创建新的 AD 组。我必须与当前存在的组
我正在尝试使用 ashx 处理程序作为 HTML5 视频源。我可以做到这一点,但我无法在已经缓冲的视频上进一步前进。 我可以在使用标准 MP4 源的网络选项卡上看到向前搜索会创建另一个请求,但使用处理
#include #include class Test { char name[10]; int data; public: void getData()
您是否知道任何具有外键约束和/或提供事务支持的 SQLite 替代方案(基于可移植/平面文件/无服务器)? 最佳答案 从版本 3.6.19 开始,SQLite supports foreign key
我正在寻找一个简单的脚本,我可以在 bash 文件中使用它来检查是否有任何可用的系统更新。 我从 #!/bin/bash clear updates=$(apt list upgradeable) i
我是一名优秀的程序员,十分优秀!