- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在一页上有 9 张图片,前 6 张没问题,但后 3 张太低了,需要抬起来与中间的图片齐平(图片 4-6),请参阅图片了解详情.
http://s29.postimg.org/5jejyjgrr/tiles.jpg
CSS:
body {
margin: 0px;
text-align: center;
}
header img {
display: inline;
margin-right: -5px;
}
nav img {
display: block;
}
div img {
display: block;
float: right;
clear: right;
}
HTML:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
<title>Space Shots</title>
</head>
<body>
<header>
<img src="/images/spaceshots/purple-space.jpg" alt="purple space" height="250" width="250">
<img src="/images/spaceshots/red-space2.jpg" alt="red space 2" height="250" width="250">
<img src="/images/spaceshots/blue-space3.jpg" alt="blue space3" height="250" width="250">
<br><br><br><br>
</header>
<nav>
<img src="/images/spaceshots/purple-space3.jpg" alt="purple space 3" height="250" width="250">
<img src="/images/spaceshots/red-space.jpg" alt="red space" height="250" width="250">
<img src="/images/spaceshots/blue-space.jpg" alt="blue space" height="250" width="250">
</nav>
<div>
<img src="/images/spaceshots/blue-space2.jpg" alt="blue space 2" height="250" width="250">
<img src="/images/spaceshots/red-space3.jpg" alt="red space 3" height="250" width="250">
<img src="/images/spaceshots/purple-space2.jpg" alt="purple space 2" height="250" width="250">
</div>
</body>
<html>
最佳答案
对你的CSS做一点改动添加一个 float :左;导航
nav img {
display: block;
float:left
}
也为div创建一个css
div{
float:right;
}
刷新您的页面!完成!
关于html - 使用 CSS 定位图像(对抗默认框/空白),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26702384/
如果我有一个像盒子一样的 div,我用 10% 的不透明度让它变得非常性感。我该如何应对它,因为 div 中的所有内容也都具有不透明度。假设我有一个带有 1px 边框和文本的框 (div),在其上设置
我知道 AngularJS 会运行某些代码两次,有时甚至更多,例如 $watch 事件,不断检查模型状态等。 但是我的代码: function MyController($scope, User, l
目前,我们在对我们的 cassandra 数据库使用 apache spark 时挑战我们的架构,因为我们遇到了非常糟糕的读取性能。 spark & cassandra 发生的硬件是一个云服务器,16
所以最近我遇到了以下问题:我必须创建一个处理请求的服务器,以便在主进程使用这些值时更新某些值。 所以这里,服务器处理函数是在子进程中,我想停止的时候都无法停止。 为了测试在 threading.Thr
准备好的语句不允许参数化表名。为了确保无法插入任何代码,我想使用 ctype_alnum 来验证进入数据库模块的所有表名(删除下划线后),以保护应用程序免受其他部分错误的影响。 function in
经典算法书籍(TAOCP、CLR)(以及不太经典的书籍,例如 fxtbook)充满了命令式 算法。这对于实现严重基于数组的算法最为明显,例如组合生成(算法中同时使用数组索引和数组值)或联合查找算法。
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
这个问题已经有答案了: Apply a Greasemonkey/Tampermonkey userscript to an iframe (6 个回答) 已关闭 5 年前。 我想知道是否可以让 Gr
SELECT p.id FROM produkty p, przyporzadkowania pr, stany_magazynowe, gk_grupy_produkty INNER JOIN su
我想将 Azure ACS 添加到我的一个站点,但所有功能都出现问题。我有一个 MVC 应用程序,它使用全局过滤器为请求的生命周期设置自定义 IPrincipal。 WIF 的“添加 STS 引用”方
我想将 Azure ACS 添加到我的一个站点,但所有功能都出现问题。我有一个 MVC 应用程序,它使用全局过滤器为请求的生命周期设置自定义 IPrincipal。 WIF 的“添加 STS 引用”方
Google 的 YouTube Analytics API 仅基于 Oauth2。我正在使用以下测试脚本来查看是否可以获得访问权限: import os import google.oauth2.c
随着 Visual Studio 2008 的发布,Microsoft 为 JavaScript 实现了代码完成和 IntelliSense 支持。 不幸的是,对 JavaScript 的支持充其量是
我在准备语句方面有更多经验,我知道它们非常适合抵御 SQL 注入(inject)攻击。 我想知道 pl/pgsql 的 format/USING 和 quote_literal/quote_nulla
我是一名优秀的程序员,十分优秀!