我想要一个 div 元素的上边距与另一个元素的下边距匹配,我该怎么做?
我可以不使用表格来做到这一点吗?
<div style="text-align:left; position:absolute; left:12%;">
<input type="checkbox" name="acceptance" value="I have read and agree with the terms and conditions.">
<label style="text-align:left; color:yellowgreen ;font-size:27px ;font-family:cursive;font-style:italic;">I have read and agree with the terms and conditions</label>
</div>
<div style="text-align:center; width = 100%;">
<a href="i-hm-p.html";><img border="0" src="images/imappyenter.png" width="100px"></a>
</div>
Run Code Online (Sandbox Code Playgroud)
请忽略我糟糕的格式,我正在编辑别人的代码并学习 CSS。
我想要做的是在一行总宽度的 12% 处放置一个复选框,并在其后立即对其进行简短的解释。我已将两者放在一个 div 元素中。
在另一个 div 元素中,我放置了一个包含在图像中的链接,我希望将其居中对齐,同时不与复选框及其可见解释位于同一行。
我怎样才能做到这一点?
我在一行中有两个特定的词 saydog和cat。
并且说dog之前出现cat。
我如何制作一个正则表达式,它告诉我包含dog和的所有行cat,但只显示dog直到之后的单词cat,包括cat,但不是dog。