【发布时间】:2021-01-19 12:19:25
【问题描述】:
这是我当前的代码:
<!DOCTYPE html>
<html>
<head>
<title>StoryReader</title>
<link rel="stylesheet" type="text/css" href="indexStyle.css">
</head>
<body>
<center><h1 id="errorbox" style="background-color: red; border-radius: 20px; font: message-box; font-size: 20px;"></h1></center>
<center><h1 style="font: message-box; font-size: 25px;">Welcome to StoryReader.</h1></center>
<center><button onclick="ReturnToHomepage()" style="background-color: chartreuse; border-radius: 5px; font: message-box;">Return to the homepage.</button></center>
<hr>
<p>
</p>
<div class="inline-block" id="Readers1">
<center><h3 style="font: status-bar; font-size: 20px;">Lion, Witch and the Wardrobe.</h3></center>
<hr>
<h4 style="font: message-box; font-size: 15px;">Description:</h4>
<p style="font: status-bar; font-size: 15px;">When the Pevensie children - Peter, Susan, Edmund and Lucy - step through a wardrobe door in the strange country house where they are staying, they find themselves in the land of Narnia. Frozen in eternal winter, Narnia is a land of snow and pine forests, and its creatures are enslaved by the terrible White Witch.</p>
<center><input type="button" value="Open" onclick="OnClickLion()"></center>
</div>
<p>
</p>
<div class="inline-block" id="Readers2">
<center><h3>Unknown...</h3></center>
<hr>
<h4>Description:</h4>
<p>Coming soon!</p>
</div>
</body>
<script src="script.js"></script>
</html>
我想让它使 Readers2 位于 Readers1 旁边,因此左侧是 Readers 1,右侧是 Readers2。我还想要每个 div 之间的间隙。这可能吗?
【问题讨论】:
-
你有css吗?
-
是的,有可能,例如看一下 CSS flex,但是在发帖之前,请自己搜索一下,这样的问题有几十个(如果不是数百个)。
标签: html