- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用代码笔并遇到一个问题,最初我的主要元素恰好位于导航栏的右侧(在左侧,高度 = 100%),但它没有被导航重叠bar,尽管我之前添加了一个足够宽的 margin-left 以允许看到 main。这是 CSS 代码:
html,
body {
min-width: 290px;
color: hsla(214, 100%, 39%, 1);
font-family: "Germania One", Helvetica, sans-serif;
font-size: 17px;
line-height: 1.25;
background-color: hsla(239, 60%, 40%, 0.49);
}
h1 {
color: black;
}
code {
background-color: hsla(179, 8%, 40%, 0.49);
border-radius: 3px;
color: white;
display: block;
text-align: left;
white-space: pre;
position: relative;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
padding: 10px;
margin: 15px;
}
#navbar {
z-index: 1;
position: fixed;
background-color: hsla(246, 81%, 24%, 1);
min-width: 290px;
top: 0px;
left: 0px;
width: 300px;
height: 100%;
border-right: solid;
border-color: hsla(264, 80%, 39%, 1);
}
header {
color: white;
font-size: 30px;
margin: 10px;
text-align: center;
font-size: 1.8em;
font-weight: thin;
}
#navbar a {
color: white;
text-decoration: none;
cursor: pointer;
}
#navbar ul {
list-style: none;
height: 88%;
overflow-y: auto;
overflow-x: hidden;
}
#navbar li {
border: 1px solid;
border-bottom-width: 0px;
padding: 8px;
padding-left: 45px;
position: relative;
left: -50px;
width: 100%;
}
#main-doc {
position: absolute;
margin-left: 310px;
padding: 20px;
margin-bottom: 110px;
}
#main-doc header {
text-align: left;
margin: 0px;
}
section article {
margin: 15px;
font-size: 0.96em;
}
section li {
margin: 10px 0px 0px 10px;
}
#Boulder-img {
width: 80%;
}
#Sherpas-img {
width: 90%;
}
@media only screen and (max-width: 815px) {
/* For mobile phones: */
#navbar ul {
border: 1px solid;
height: 207px;
}
code {
overflow-x: scroll;
}
#navbar {
position: absolute;
top: 0;
padding: 0;
margin: 0;
width: 100%;
max-height: 275px;
border: none;
z-index: 1;
border-bottom: 2px solid;
}
#main-doc {
position: relative;
margin-left: 0px;
margin-top: 270px;
}
#main-doc section {
color: black;
/* padding-top: 240px; */
}
}
@media only screen and (max-width: 400px) {
#navbar {
font-size: .75em;
}
#navbar ul {
height: 222px;
}
}
#main-doc {
margin-left: -10px;
}
code {
margin-left: -20px;
width: 100%;
padding: 15px;
padding-left: 10px;
padding-right: 45px;
min-width: 233px;
}
}
<nav id="navbar">
<header>
FCC Technical Documentation</header>
<ul>
<li><a href="#Explanation" class="nav-link">Explanation</a></li>
<li><a href="#Early_Life" class="nav-link">Early Life</a></li>
<li><a href="#First_Move" class="nav-link">First Move</a></li>
<li><a href="#Some_Technical_Documentation" class="nav-link">Some Technical Documentation</a></li>
<li><a href="#Present_Day" class="nav-link">Present Day</a></li>
</ul>
</nav>
<main id="main-doc">
<section class="main-section" id="Explanation">
<header>
Explanation
</header>
<article>
<p>
Introduction paragraph
<br>
<code>
<code>
<u>insert example code here</u>
</code>
</code>
<br>
<p>It looks like I will have to do 5 of these code elements in the project. In order to display the symbol "<", I have to type
<br>
<code>
&+l+t
</code>
<br> using those characters above without the plus signs. ">" is made by using the following in the same way:
<br>
<code>
&+g+t
</code>
<br> I don't know how to display those characters together without it automatically displaying as those carrot symbols. I will ask on StackOverFlow (coding website/forum).
</p>
<p>
I could do a documentation page describing what I already know and will use to make this page but I can't be bothered :p.
</p>
<p>
So I posted my question on StackOverFlow, perhaps I will update in this section (sorry if it is long) if I get an answer. I've gotten the idea to use the code elements to do small features within the page to explain how I made certain parts of it. I also
read through the prompt completely (glanced over it), and it seems that that was the only road bump. Thanks and enjoy.
<br>:)
</p>
</article>
</section>
<section class="main-section" id="Early_Life">
<header>
Early Life
</header>
<article>
<p>
Early life paragraph
</p>
<h1>first photo header</h1>
<img src="" alt="" id="">
<p>
<h1>header for story</h1>
story paragraph
</p>
<img src="" alt="" id="">
<p>To code in the photos above, I used the img element. The coding goes as follows:
<br>
<code>
<img src="linkofimagegoeshere" alt="descriptionincasephotofails" id="goodtohaveidtoalterappearancewithCSS">
</code>
</p>
</article>
</section>
<section class="main-section" id="First_Move">
<header>
First Move</header>
<article>
<p>
first move paragraph
</p>
<p>
I later moved to a small town in blank for high school
</p>
</article>
</section>
<section class="main-section" id="Some_Technical_Documentation">
<header>
Some Technical Documentation
</header>
<article>
<p>
So it turns out that you can display the code of how to code in a carrot symbol inside of a coding element without having what you type turn into a carrot itself. Sorry if that made no sense, this is hard to describe unless it is seen visually. Here is
the code that you can enter in order to show &+l+t and &+g+t without them turning into carrots (basically ampersand has it's own sort of reference code).
<br>
<code>
&ltcode&gt turns into <code>
</code>
<br> In order to prevent &+l+t (etc.) to turn into a carrot, the ampersand code is &+amp;+lt or gt. Please don't send me further down this rabbithole. I don't want to learn how to display that one without the plus signs.
</p>
<p>If it appears that some of my CSS code matches that of the example, it is that I am following along with the code as to learn what all of it means and how it works. I'll set most of the copied values the same but I like to adjust them to learn more
about the associated properties. I definitely did all of the HTML by myself and half of the CSS alone. Once I got stumped, however, I looked at the example's code. I was trying to use flex boxes to make the nav bar, but it turns out that just
using absolute/relative position with margin, padding, top, left, etc. works better.</p>
</article>
</section>
<section class="main-section" id="Present_Day">
<header>
Present Day
</header>
<article>
<p>
final paragraph
</p>
<p>On top of that, I am also: <br>
<ul>
<li>lifting weights</li>
<li>walking and jogging two miles daily</li>
<li>playing guitar</li>
<li>learning to code</li>
<li>making weekly videos documenting my journey</li>
<li>blank</li>
<br> and
<br>
<li>blank</li>
<br> I'm hoping to get back to my social life as well.
</ul>
I've gone a long way already but I have much longer to go.
<br> Thanks for reading! :)
</p>
</article>
</section>
</main>
我对这一切还是陌生的,老实说不知道问题出在哪里,所以我粘贴了整个 css 代码,除了我的字体导入。
最佳答案
您在 (max-width: 400px)
断点上有一个额外的 ,它覆盖了之前的
margin-left
规则 margin-left: -10px
html,
body {
min-width: 290px;
color: hsla(214, 100%, 39%, 1);
font-family: "Germania One", Helvetica, sans-serif;
font-size: 17px;
line-height: 1.25;
background-color: hsla(239, 60%, 40%, 0.49);
}
h1 {
color: black;
}
code {
background-color: hsla(179, 8%, 40%, 0.49);
border-radius: 3px;
color: white;
display: block;
text-align: left;
white-space: pre;
position: relative;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
padding: 10px;
margin: 15px;
}
#navbar {
z-index: 1;
position: fixed;
background-color: hsla(246, 81%, 24%, 1);
min-width: 290px;
top: 0px;
left: 0px;
width: 300px;
height: 100%;
border-right: solid;
border-color: hsla(264, 80%, 39%, 1);
}
header {
color: white;
font-size: 30px;
margin: 10px;
text-align: center;
font-size: 1.8em;
font-weight: thin;
}
#navbar a {
color: white;
text-decoration: none;
cursor: pointer;
}
#navbar ul {
list-style: none;
height: 88%;
overflow-y: auto;
overflow-x: hidden;
}
#navbar li {
border: 1px solid;
border-bottom-width: 0px;
padding: 8px;
padding-left: 45px;
position: relative;
left: -50px;
width: 100%;
}
#main-doc {
position: absolute;
margin-left: 310px;
padding: 20px;
margin-bottom: 110px;
}
#main-doc header {
text-align: left;
margin: 0px;
}
section article {
margin: 15px;
font-size: 0.96em;
}
section li {
margin: 10px 0px 0px 10px;
}
#Boulder-img {
width: 80%;
}
#Sherpas-img {
width: 90%;
}
@media only screen and (max-width: 815px) {
/* For mobile phones: */
#navbar ul {
border: 1px solid;
height: 207px;
}
code {
overflow-x: scroll;
}
#navbar {
position: absolute;
top: 0;
padding: 0;
margin: 0;
width: 100%;
max-height: 275px;
border: none;
z-index: 1;
border-bottom: 2px solid;
}
#main-doc {
position: relative;
margin-left: 0px;
margin-top: 270px;
}
#main-doc section {
color: black;
/* padding-top: 240px; */
}
}
@media only screen and (max-width: 400px) {
#navbar {
font-size: .75em;
}
#navbar ul {
height: 222px;
}
/* } You had this closing bracket here*/
#main-doc {
margin-left: -10px;
}
code {
margin-left: -20px;
width: 100%;
padding: 15px;
padding-left: 10px;
padding-right: 45px;
min-width: 233px;
}
}
<nav id="navbar">
<header>
FCC Technical Documentation</header>
<ul>
<li><a href="#Explanation" class="nav-link">Explanation</a></li>
<li><a href="#Early_Life" class="nav-link">Early Life</a></li>
<li><a href="#First_Move" class="nav-link">First Move</a></li>
<li><a href="#Some_Technical_Documentation" class="nav-link">Some Technical Documentation</a></li>
<li><a href="#Present_Day" class="nav-link">Present Day</a></li>
</ul>
</nav>
<main id="main-doc">
<section class="main-section" id="Explanation">
<header>
Explanation
</header>
<article>
<p>
Introduction paragraph
<br>
<code>
<code>
<u>insert example code here</u>
</code>
</code>
<br>
<p>It looks like I will have to do 5 of these code elements in the project. In order to display the symbol "<", I have to type
<br>
<code>
&+l+t
</code>
<br> using those characters above without the plus signs. ">" is made by using the following in the same way:
<br>
<code>
&+g+t
</code>
<br> I don't know how to display those characters together without it automatically displaying as those carrot symbols. I will ask on StackOverFlow (coding website/forum).
</p>
<p>
I could do a documentation page describing what I already know and will use to make this page but I can't be bothered :p.
</p>
<p>
So I posted my question on StackOverFlow, perhaps I will update in this section (sorry if it is long) if I get an answer. I've gotten the idea to use the code elements to do small features within the page to explain how I made certain parts of it. I also
read through the prompt completely (glanced over it), and it seems that that was the only road bump. Thanks and enjoy.
<br>:)
</p>
</article>
</section>
<section class="main-section" id="Early_Life">
<header>
Early Life
</header>
<article>
<p>
Early life paragraph
</p>
<h1>first photo header</h1>
<img src="" alt="" id="">
<p>
<h1>header for story</h1>
story paragraph
</p>
<img src="" alt="" id="">
<p>To code in the photos above, I used the img element. The coding goes as follows:
<br>
<code>
<img src="linkofimagegoeshere" alt="descriptionincasephotofails" id="goodtohaveidtoalterappearancewithCSS">
</code>
</p>
</article>
</section>
<section class="main-section" id="First_Move">
<header>
First Move</header>
<article>
<p>
first move paragraph
</p>
<p>
I later moved to a small town in blank for high school
</p>
</article>
</section>
<section class="main-section" id="Some_Technical_Documentation">
<header>
Some Technical Documentation
</header>
<article>
<p>
So it turns out that you can display the code of how to code in a carrot symbol inside of a coding element without having what you type turn into a carrot itself. Sorry if that made no sense, this is hard to describe unless it is seen visually. Here is
the code that you can enter in order to show &+l+t and &+g+t without them turning into carrots (basically ampersand has it's own sort of reference code).
<br>
<code>
&ltcode&gt turns into <code>
</code>
<br> In order to prevent &+l+t (etc.) to turn into a carrot, the ampersand code is &+amp;+lt or gt. Please don't send me further down this rabbithole. I don't want to learn how to display that one without the plus signs.
</p>
<p>If it appears that some of my CSS code matches that of the example, it is that I am following along with the code as to learn what all of it means and how it works. I'll set most of the copied values the same but I like to adjust them to learn more
about the associated properties. I definitely did all of the HTML by myself and half of the CSS alone. Once I got stumped, however, I looked at the example's code. I was trying to use flex boxes to make the nav bar, but it turns out that just
using absolute/relative position with margin, padding, top, left, etc. works better.</p>
</article>
</section>
<section class="main-section" id="Present_Day">
<header>
Present Day
</header>
<article>
<p>
final paragraph
</p>
<p>On top of that, I am also: <br>
<ul>
<li>lifting weights</li>
<li>walking and jogging two miles daily</li>
<li>playing guitar</li>
<li>learning to code</li>
<li>making weekly videos documenting my journey</li>
<li>blank</li>
<br> and
<br>
<li>blank</li>
<br> I'm hoping to get back to my social life as well.
</ul>
I've gone a long way already but I have much longer to go.
<br> Thanks for reading! :)
</p>
</article>
</section>
</main>
关于html - 为什么在计算机全屏显示时我的主要元素不在导航栏的右侧?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55301706/
我使用 Runtime.getRuntime().exec 来运行 perl 程序。现在我想在执行过程中显示百分比进度条,然后在perl程序执行完成后,它应该关闭进度条。我该怎么做? Runtime.
我已广泛搜索该网站,但找不到答案。请我是新手,我需要你的帮助。 我想创建一个固定的导航栏,但每次在我的 CSS 样式表中放置一个固定的规则时,导航栏都会消失。这是我的 html 代码:
Here's a nice jsFiddle illustrating the problem 我正在尝试创建一个标题栏元素... 永远只有 1 行高 在右上角有始终存在的控件 在左上角有一个标题,如
int fd = open(JOYSTICK_NAME, O_RDONLY | O_NONBLOCK); O_RDONLY 和 O_NONBLOCK 之间的栏是什么意思?我在 OpenGL/GLUT
我注意到我的网页在页脚之后和页面底部有一个空白/栏: 我试图通过使用 Chrome 中的 inspect 元素来查找此问题的原因,但找不到任何内容。我正在使用 Boostrap,这是我的页脚 HTML
我已经对这个主题进行了一些研究,但我找不到完整的解决方案,因此,我一步一步地尝试和错误,我终于找到了如何实现这些结果:透明或彩色Actionbar 和 Statusbar。请参阅下面的答案。 最佳答案
Highcharts 教程中的经典示例是: $(function () { $('#container').highcharts({ chart: { type: 'bar'
注意 :这与 iOS 13 中使用的新默认模态呈现样式无关。 我有一个奇怪的问题,显示模态 UINavigationController . 考虑一个 UIViewController位于 UINav
我需要帮助了解如何在加载页面时隐藏 iPad 地址栏或顶部的整个地址栏。 我正在开发基于在线客户管理系统的系统,需要隐藏 iPad 地址栏,因为它在查看网站时会占用大量空间。 问候涡流 已经尝试了以下
我在向栏中添加文本时遇到了一些问题。我想在栏上方显示值,但我无法向每个栏添加文本。 现在我的dom结构是: g rect rect rect 我想要什么: g g.bar rect
我有 ListView ,数据将从数据表显示在 ListView 中像这样我已经完成了但是我在数据行 6 有问题 dt = classes.xxxxx.GetData(sql,
我使用 opposite 属性将 xAxis 向右移动。条形图怎么可能也从右侧开始? 谢谢! Highcharts.chart('absoluteInterruptions', { chart:
我得到了这张图片,我想在我的导航 Controller 中使用它: 我是这样设置的(根据 this 问题的建议): UINavigationBar *theBar = self.navigationC
这个问题在这里已经有了答案: How to disable breadcrumbs in Eclipse (11 个答案) 关闭 9 年前。 有谁知道如何删除我在 Eclipse 中用红色圈出的栏?
总而言之,我的应用程序中有一个浏览器,我希望它只启动 5 个网站,仅此而已。有没有办法让我的浏览器通过设置自定义字符串来启动 5 个网站,例如 if {用户键入此字符串} 转到该网站,然后 else
我想在我的应用程序中实现一个进度条。发生的过程是应用程序将一个目录复制到 iOS 文档目录中。通常需要 7-10 秒(iPhone 4 测试)。我对进度条的理解是你在事情发生时更新进度条。但是根据目录
我正在寻找一种创建交互式子弹图的方法,它允许用户单击图中的任意位置并设置一个标记,然后根据该标记所在的位置计算一些简单的值。例如,我希望它看起来类似于: http://www.usrecordings
我目前在一个网站上工作,我有一张人的照片。在图片的右侧,我想要名称和描述。名称应与描述具有不同的背景。我上传了一张它应该是什么样子的图片:http://www.tiikoni.com/tis/view
我将 div 栏设置为不滚动,因此它将始终显示在网站顶部。在这个栏内,我有另一个 div 框,里面有两个按钮,它们向右浮动,所以它们总是在右上角。 问题是我希望按钮居中于页面的右上角而不是右上角。相反
因此,我在我的网站中使用了一个选择栏。我试图在悬停时更改选项的背景颜色。此外,如果有人知道设置垂直 slider 样式的好方法,那就太棒了。 这是我正在尝试做的事情的 fiddle : http://
我是一名优秀的程序员,十分优秀!