- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我希望内部 div 的 left
和 right
始终位于包装 div 的中心,当设备屏幕小于 600 像素时,right
内部 div 位于 left
内部 div 下方。
我试过很多次,但都无济于事。我所有的代码都在 jsfiddle 上:
https://jsfiddle.net/vdwz3csp/5/
这是我的 html 代码:
<div id="wrap">
<div id="left">
<span>
<img
class="wp-image-440 size-medium aligncenter"
src="http://www.generalgreenestudios.com/wp-content/uploads/2015/09/danielgreene-circle-300x300.png"
alt="Daniel Greene"
width="200"
height="200" />
</span>
<span class="about-desc">
<p style="text-align: center;">
<strong>Daniel Greene</strong>
</p>
<p style="text-align: center;">
Cinematographer/Editor
</p>
<hr style="border-color: #333333;" />
<p style="text-align: justify;">
Text here
</p>
</span>
</div>
<div id="right">
<span>
<img
class="wp-image-435 size-medium aligncenter"
src="http://www.generalgreenestudios.com/wp-content/uploads/2015/09/alexandriagreene-circle-300x300.png"
alt="Alexandria Greene"
width="200"
height="200" />
</span>
<span class="about-desc">
<p style="text-align: center;">
<strong>Alexandria Greene</strong>
</p>
<p style="text-align: center;">
Accounts/Client Relations
</p>
<hr style="border-color: #333333;" />
<p style="text-align: justify;">
Some text goes here
</p>
</span>
</div>
</div>
这是我的CSS代码:
#wrap {
display: flex;
justify-content: center;
width: 100%;
}
#left, #right {
padding: 20px;
width:25%;
min-width:300px;
float:left;
}
@media screen and (max-width: 600px) {
#left {
float:none;
width:auto;
margin:0 auto;
}
#right {
float:none;
width:auto;
margin:50px auto;
}
}
最佳答案
尝试使用flex-direction
更新的 fiddle :https://jsfiddle.net/vdwz3csp/7/
#wrap {
display: flex;
justify-content: center;
flex-direction:row;
width: 100%;
}
#left, #right {
padding: 20px;
width:25%;
min-width:300px;
}
@media screen and (max-width: 600px) {
#wrap
{
flex-direction:column;
}
}
关于html - 响应式网页设计 : Inner DIV's in a wrapper DIV - Want the inner DIV's to stack on top of each other on mobile devices,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32975879/
class Outer { class Inner { } } public class Demo { public static void main(
我在我的 PC 上使用 bitnami WAMP 创建了一个 mysql 服务器,并使用流畅的 SQL 创建了两个表 table_a 和 table_b: CREATE TABLE `table_a`
select sld.linkid,sld.accept,scd.catid,scd.catname,scd.caturl,scd1.parentcatid from sound_li
为什么在实例化通用外部类(连同内部类)时使用菱形运算符会在代码段 2 中产生错误,而代码段 1 却完全没问题? 我知道稀有类型是被禁止的,但我的情况不是稀有类型——在稀有类型中,外部和内部都是通用的,
这不是那么重要(请注意),但它是一个语法特殊性,它是关于可移植性的,我没有找到引用可靠资源或规范的问题(或答案),所以我很好奇: 省略 INNER 是否安全关键字,如果我明确想要 INNER JOIN
同一查询的这两个版本之间的性能有什么区别吗? --Version 1 SELECT p.Name, s.OrderQty FROM Product p INNER JOIN SalesOrderDet
阅读 Doctrine 2 文档时 at this page我可以看到他们有两种方法来指定内部连接的条件: // Example - $qb->expr()->innerJoin('u.Group',
我想知道我怎么能直接从外部类型到达内部类,就好像它是一个静态成员一样: public class Hello { public class UnderHello { v
我有一个这样的界面: public interface SuperInterface { public interface SubInterface { public void
假设有两个表: students (student_id INT, class_id INT); instructors (instructor_id INT, class_id INT); 这两者之
有表 A 和表 B。我想将这些表连接到两列,但仅限于表 A 的选定行。 查询场景: SELECT B.* FROM B INNER JOIN (SELECT * FROM A WHERE A.COLU
今天我了解了SQL Server中的一个东西,叫做INNER LOOP JOIN . 这是什么意思? (谷歌没有提供帮助……或者我应该说……有关它的博客文章有点……技术性,让我大吃一惊)。 此外,在哪
我开始学习 SQL。而且我发现我们经常可以在 JOIN 或内部选择语句的帮助下获得相同的结果。 问题 1(广泛):JOIN 在哪里比内部选择更快,反之亦然? 问题 2(窄):您能解释一下是什么导致了以
我真的很努力地完成这项任务,因此非常感谢任何帮助或指导。 表格: module_uploads +--------------------------+
仅当连接表中存在记录时,我才尝试根据连接表中的条件从用户表中选择一行。如果记录不存在,我想返回该行。我只想在存在 INNER JOIN 记录且 contact_blocked != 1 时不返回该行。
我有一个包含字符的数据库。由于角色的名称不仅在名称与角色分开时才使用。由于有 Male 和 Female 字符,我将它们保存在不同的表中: tbl_player, tbl_maleName, tbl_
[决定如何表述问题并不容易...] 这是一个 example jsfiddle . 紫色的 div ('#inner') 高 1000 像素。 如何制作红色 div ('#out') 的滚动条 - 控
我正在为 wordpress 中的帖子开发一个过滤器,它使用来自 postmeta 的数据:我的日期过滤器正在运行并给我这个查询: 工作查询结果: SELECT SQL_CALC_FOUND_ROWS
我有使用引导类并动态添加 带有引导类和 clearfix 的元素 var li = $("").addClass("list-group-item clearfix"); var div = $(
我已经为 Test_flow 创建了简单的测试套件,但是当我尝试运行该流程时出现错误。 java.lang.RuntimeException: org.mule.api.config.Configur
我是一名优秀的程序员,十分优秀!