- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个关于在 css 中继承的非常奇怪的错误。不在“a”元素 block 内的p元素,继承“a”元素的属性,奇怪地变成了“a”元素。
// !! IMPORTANT README:
// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place.
/***********
INSTRUCTIONS:
- Select the project you would
like to complete from the dropdown
menu.
- Click the "RUN TESTS" button to
run the tests against the blank
pen.
- Click the "TESTS" button to see
the individual test cases.
(should all be failing at first)
- Start coding! As you fulfill each
test case, you will see them go
from red to green.
- As you start to build out your
project, when tests are failing,
you should get helpful errors
along the way!
************/
// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!
// Once you have read the above messages, you can delete all comments.
@import url("https://fonts.googleapis.com/css?family=Lato|Roboto");
body {
margin: 0;
}
#navbar {
min-height: 90px;
position: fixed;
top: 0;
left: 0;
right: 0;
display: flex;
justify-content: flex-end;
align-items: center;
background: #303841;
}
#navbar a {
padding: 0 6vw;
text-decoration: none;
font: bold calc(20px + 1vw) "Lato";
color: #f6c90e;
letter-spacing: 2px;
text-shadow: 0 2px 0 black;
}
.container #welcome-section {
background: #303841;
height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.container #welcome-section header {
font-size: calc(20px + 2vw);
font-weight: bold;
font-family: 'Lato';
color: #f6c90e;
letter-spacing: 4px;
text-shadow: 0 2px 0 black;
text-align: center;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.container #welcome-section header p {
margin-top: 0;
color: #eeeeee;
}
.container #welcome-section header h1 {
margin-bottom: 10px;
}
.container #projects {
min-height: 100vh;
display: flex;
align-items: baseline;
justify-content: space-evenly;
flex-wrap: wrap;
background: #3a4750;
}
.container #projects h2 {
flex-basis: 100%;
text-align: center;
font-size: calc(20px + 3vw);
font-weight: bold;
font-family: 'Lato';
color: #eeeeee;
text-decoration: underline;
text-shadow: 0 2px 0 black;
}
.container #projects figure {
width: 35vw;
}
.container #projects figure img {
display: block;
max-width: 100%;
border-radius: 2%;
}
.container #projects figure a {
text-decoration: none;
display: block;
}
.container #projects figure figcaption {
text-align: center;
text-shadow: 0 2px 0 black;
font: bold calc(15px + 1vw) "Roboto";
color: #f6c90e;
}
@media (max-width: 768px) {
#navbar {
justify-content: space-between;
}
#projects > * {
flex-basis: 100%;
padding-bottom: 10px;
}
#projects a {
width: 75%;
margin: 0 auto;
}
}
@media (max-width: 768px) and (max-width: 576px) {
#navbar {
flex-direction: column;
justify-content: space-evenly;
align-items: center;
}
}
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<!-- Navigation bar -->
<nav id="navbar">
<a href="#welcome-section">About</a>
<a href="#projects">Work</a>
<a href="#">Contact</a>
</nav>
<!-- Main content -->
<main class="container">
<section id="welcome-section">
<header>
<h1>Anıl Emek Türkeli</h1>
<p>Frontend Developer</p>
</header>
</section>
<section id="projects">
<h2>All Works I've Done So Far </h2>
<figure class="project-tile">
<a href="https://codepen.io/anilemek/full/VRmXqP" target="_blank"><img src="https://cdn1.imggmi.com/uploads/2019/3/12/f3614255ab87606e66bf5d449e194599-full.png"</a>
<figcaption>Sass Technical Documentation Page</figcaption>
</figure>
<figure class="project-tile">
<a href="https://codepen.io/anilemek/full/YgqoLa" target="_blank"><img src="https://cdn1.imggmi.com/uploads/2019/3/12/99066cf68f33649bc17562c4925c3afa-full.png"</a>
<figcaption>Repedo Landing Page</figcaption>
</figure>
<figure class="project-tile">
<a href="https://codepen.io/anilemek/full/BMbwXE" target="_blank"><img src="https://cdn1.imggmi.com/uploads/2019/3/12/626217cf51607a559f6a47fad499f355-full.png"</a>
<figcaption>Repedo Survey Form</figcaption>
</figure>
<figure class="project-tile">
<a href="https://codepen.io/anilemek/full/OddXaR" target="_blank"><img src="https://cdn1.imggmi.com/uploads/2019/3/12/1dbdcffbefc68964500597ec04e48e05-full.png"</a>
<figcaption>Mustafa Kemal Atatürk's Tribute Page</figcaption>
</figure>
</section>
<section id="contact">
<p>Deneme</p>
</section>
</main>
https://codepen.io/anilemek/pen/PLjpQm
谁能解释为什么会出现这个问题?
谢谢。
最佳答案
如果是关于 <p>
带文字 Deneme
在网站底部,问题出在 img
标签之前。你必须关闭它们。例如,<img src="https://cdn1.imggmi.com/uploads/2019/3/12/626217cf51607a559f6a47fad499f355-full.png"/>
关于css - 奇怪的从 "a"中的 "figure"元素继承到 "p"元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55131908/
你能帮我理解我做错了什么吗?我有 NetBeans、MinGW 编译器和 Qt 库。 *图.h* class Figure: public QObject{ //18 Q_OBJECT
一位程序员提醒我注意一个问题,matplotlib.pyplot 和 Tkinter 不能很好地协同工作,如这个问题所示 Tkinter/Matplotlib backend conflict cau
我试图在同一张图上绘制一系列函数。代码似乎运行正常,但是没有图片出来。只是简单的 如何修复? 最佳答案 在 IPython 控制台中,确保图形显示(无需显式调用 plt.show())的最佳方法是使
所以我将以下简单代码保存在 .py 文件中,并在 shell 中执行: import matplotlib.pyplot as plt myfig = plt.figure(figsize=(5, 5
我正在尝试处理带有对象的图形列表。不幸的是,从图表列表中绘图似乎有问题。 请注释掉下面示例中的行,您会看到绘图是如何中断的: import matplotlib as mpl from matplot
如 http://matplotlib.org/users/event_handling.html 中所述下面的示例代码工作正常 import matplotlib.pyplot as plt fig
我正在使用 matplotlib 绘图,并使用 ioff() 关闭交互模式,以禁止在创建图形时自动打开绘图窗口。我希望完全控制该图形,并且仅在显式使用 show() 命令时才能看到它。 现在显然用于清
创建matplotlib图形后是否可以保存它?例如: import matplotlib.pyplot as plt import numpy normal = numpy.random.normal
我开始构建 Tkinter 应用程序,最初使用的是 matplotlib 的 Figure 和 figure.add_subplot。有了它,一切都完美无缺。对于更多自定义,我现在想移动到 pyplo
我正在使用 Quarto 并渲染为 PDF。我有带有子图的数字。子图的标题很长(很多字)。问题是 PDF 中的子图标题没有分开。这是问题的说明; 请注意,子图的标题之间没有分隔(空白): 我尝试过使用
我正在阅读一些教程,包括 official docs似乎每个人都更喜欢输出一个图形。 例如: @app.callback( Output('graph-with-slider', 'figur
我正在阅读一些教程,包括 official docs似乎每个人都更喜欢输出一个图形。 例如: @app.callback( Output('graph-with-slider', 'figur
我正在尝试使用 Figure.transFigure.transform() 功能在图形坐标中绘制线条,但要么我不完全理解它,要么出现其他问题。根据Matplotlib Documentation ,
我有一个返回 Figure 对象的外部函数,在这种情况下,每个 Figure 对象都由一个 Axes 对象组成。 我想组成一个由这两个图形组成的新图形(比方说水平连接)。 所以理想情况下,我想说: f
我正在尝试制作一个包含六个独立地 block 的图形,这些地 block 分为两行,每行三个地 block 。每行图都应该有自己的颜色条,对应于水平组中三个图中显示的图像。从视觉上看,该图应如下所示:
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 9年前关闭。 Improve this q
matplotlib.figure.Figure.add_subplots() ( doc ) 应该返回一个轴。 但是,做 import matplotlib.pyplot as plt fig =
这是我的代码中出现错误的部分(都与图表相关,但要点: plt.figure (figsize = (10,6)) plt.title ("Alfa x CL") plt.plot (Alpha,CL,
我正在尝试使用破折号绘制一些数据的代码,我在想,我做对了。但不确定为什么会收到一条非常奇特的消息(plotly 3.8.1 and dash 0.42) 我得到的错误信息是: Invalid argu
为了去除图中的框架,我写了 frameon=False 与 pyplot.figure 完美搭配,但使用 matplotlib.Figure 只会移除灰色背景,框架保持不变。另外,我只希望线条显示出来
我是一名优秀的程序员,十分优秀!