位置 div 移动到 CSS 网格中指定的不同位置
Location div moves to a different place that specified in CSS Grid
我创建的位置 div 移动到标题 header 的右侧,而不是移动到关于 div 的右侧。
https://jsfiddle.net/j0j4xfLe/3/
<div id="location">
<h3 class="content-title">Where are we?</h3>
<p id="locationMap">Google Maps</p>
<p id="locationAddress">Location</p>
</div>
^^这是位置div^^
这是因为您的标题与您想要包含在网格中的其他区域不在同一层级,因此它假设这是一个空的 space,没有任何与该名称匹配的内容。
updated fiddle
我创建的位置 div 移动到标题 header 的右侧,而不是移动到关于 div 的右侧。
https://jsfiddle.net/j0j4xfLe/3/
<div id="location">
<h3 class="content-title">Where are we?</h3>
<p id="locationMap">Google Maps</p>
<p id="locationAddress">Location</p>
</div>
^^这是位置div^^
这是因为您的标题与您想要包含在网格中的其他区域不在同一层级,因此它假设这是一个空的 space,没有任何与该名称匹配的内容。
updated fiddle