- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在 div 中有一个 h1 标签,我希望它从右上推到 div 的顶部。我试过在 h1 上添加上边距,但这没有帮助。当我在 div '#contact' 中放置一些文本时,h1 突然向下移动。有没有办法在“#contact”中没有文本的情况下将 h1 向下移动? 提前致谢。
片段:
<div style="float:left; margin: 0; width: 100%;background-color:#eeeeee;font-size: 20px;color: #252a30;text-align: center;">
<style>
.half {
width: 40%;
margin: 3%;
font-size: 0.7em;
display: block;
}
.hl {
text-align: left;
float: left;
}
.hr {
text-align: right;
float: right;
}
.project-tags {
color: #b2c6cd;
font-size: 0.9rem;
font-weight: 700;
letter-spacing: 1px;
opacity: 1;
text-transform: uppercase;
}
.half ul, .half h1 {
margin-bottom: 0px;
margin-top: 0px;
}
.half h1 {
margin-bottom: 5px;
}
.project-tags li {
color: #fed766;
}
.project-tags span {
color: #b2c6cd;
}
.half p {
font-weight: 300;
font-size: 20px;
}
.button-primary {
margin: 10px 0 60px;
color: #252a30;
background-color: rgba(0, 0, 0, 0);
border: 2px solid #FED766;
height: auto;
font-size: 1rem;
line-height: normal;
text-transform: uppercase;
font-weight: 700;
transition: all .3s ease-in-out;
letter-spacing: 0;
border-radius: 50px;
display: inline-block;
text-align: center;
text-decoration: none;
white-space: nowrap;
cursor: pointer;
box-sizing: border-box;
outline: 0;
padding: 1.0rem 3.0rem;
}
.button-primary:hover {
color: #FED766;
background-color: #252a30;
border: 2px solid #252a30;
padding: 1.0rem 3.5rem;
}
.on-ylw {
border: 2px solid #252a30;
}
</style>
<p id="projects"></p>
<h1>My Projects</h1>
<p style="font-weight: 300;">Examples of my work</p>
<div class="projects" style="margin: 0 15%;">
<div class="half hl">
<h1>Text</h1>
<ul class="project-tags">
<li><span>Python</span></li>
</ul>
<p>Text</p>
<a href="link" class="button-primary">Visit Website</a>
</div>
<div class="half hr">
<img src="image" alt="link" style="border-radius: 10px;position: relative: width: 100%; border-style: none;">
</div>
</div>
</div>
<div style="margin: 0; width: 100%; background-color: #FED766;position: static;">
<div id="contact"></div>
<br>
<br>
<h1 style="text-align: center; font-weight: bold; color: #000000; font-size: 40px;">Want To Contact Me</h1>
<p style="text-align: center; font-weight: 300; font-size: 25px; color: #000000;">I'm currently accepting new projects and would love to hear about yours.</p>
<br>
<button class="button-primary on-ylw" style="display: table; margin: 0 auto;">Contact Me</button>
<br>
<br>
</div>
最佳答案
添加:
clear: both;
<div>
的属性h1 在里面。DOM 上的 div 你有 float: left;因此它实际上并不在您期望的 dom 中。
然后您应该能够按预期将 marign-top 添加到 H1。
关于HTML - div 中的第一个文本不会被下推,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50105703/
当我推/拉存储库时,是否可以详细输出到底发生了什么?目前,我有一个大型存储库,正在将其推送到服务器,大约 15 分钟后。或者这样,它给了我一个错误,但没有告诉我它在这 15 分钟内做了什么。 最佳答案
我不知道我的方法是否有意义,但是,我需要实现如下图的布局: 现在,我只写一个 并用其中的一列表示每个区域,例如 . 没有黄色区域,这工作正常: green red blue
当我查看许多 CSS 网格系统和框架时,它们通常具有标准的列和行设置以及百分比宽度。例如这样的事情: 标准网格列: .col-10 { width: 83.33333%; width: cal
我想使用 git 子模块。 我需要采取的步骤将我的更改推送到我的项目是 add/commit/push from submodule directory add/commit/push from pa
以下为百度站长平台的公告全文: 结合站长对于关键词数据分析的需求,站长平台对流量与关键词工具进行了升级,推出(“关键词影响力”)这一全新概念。关键词影响力算法复杂,涵盖该关键词下百度搜索可以为
我需要一个具有普通按钮和下拉按钮的控件。 例如 类似的控件在 wxRibbonButtonBar 中可用,我无法在简单的 wxPanel 中使用它。 最佳答案 我实现了 SplitButton,它看起
我一直在做一个项目,使用 Bazaar 作为版本控制系统。现在我必须和离岸人员一起工作,而他们只想使用 SVN。 我有什么: 我的 bazaar 分支及其文件和修订版。 一个全新的 subversio
我一直在开发数据流/图表风格的内部 DSP 应用程序(Java 带有 Groovy/Jython/JRuby 的钩子(Hook),通过 OSGi 的插件,大量的 JNI),类似于纯数据和 simuli
我正在尝试使用 THUMB 指令创建一个阶乘方法,我基本上做到了。 我只有一个关于 PUSH/POP 操作码的问题:如果我使用 push 将 r0 的值存储在堆栈中(所以 push {r0} ),我可
在尝试 ZeroMQ Push/Pull (他们称之为 Pipeline)套接字类型时,我很难理解这个图案。它被称为“负载均衡器”。 假设单个服务器将任务发送给多个工作人员,推/拉将在所有客户端之间平
有什么方法可以使用 push() 方法找出我的数据何时保存在数据库中?我写了下面的代码,但它多次保存数据...... db.ref('news').push(opts).then(() => {
我有这个问题,每次推或拉时我都必须把它放进去。我认为这是新的。有什么想法吗? 最佳答案 您可能正在使用 https 网址。切换到 ssh 并确保您的 key 设置正确(如果您的密码短语为空),则不必输
为什么当您将一个值压入堆栈时,ESP 寄存器会减少(而不是增加),而当您弹出一个值时,ESP 寄存器会增加(而不是减少)?在这一点上,这对我来说是违反直觉的。 最佳答案 那是因为堆栈是从上到下“增长”
有什么方法可以使用 push() 方法找出我的数据何时保存在数据库中?我写了下面的代码,但它多次保存数据...... db.ref('news').push(opts).then(() => {
我决定编写一个测试代码来查看 pusher - many pullers bundle 是如何工作的,我的怀疑成真了。 拉取器按照连接的顺序接收消息,例如第一个消息由第一个连接的拉取器接收,第二个由第
我在 CSV 文件中存储了一长串日期。我已经成功地使用 d3.js 加载了这个数据集。现在我想向此数据集添加另一列,其中包含列表中每个日期的随机数。 我相信此数据集已作为对象数组加载。所以我正在使用下
我一直在寻找解决方案。不使用 c++11。 for(int a = 1; a < team1.chan; a++) { team1.nums.push_back(ppb.back())
我打算在布局中构建带有滑动 subview 的 UI。 +--------------+ +--------------+ +--------------+ | view1
Title 在小屏幕上,我首先需要标题,然后是文本字段,但在中等以上的屏幕上,我需要相反的方式 - 我已经尝试过推和拉,但它们无法工作 - 有什么想法吗? 最佳答案 根据 Swa
zmq 的某些部分未以可预测的方式运行。 我正在使用 VS2013 和 zmq 3.2.4。为了不在我的 pubsub 框架中“丢失”消息 [旁白:我认为这是一个设计缺陷。我应该能够首先启动我的订阅者
我是一名优秀的程序员,十分优秀!