我正在尝试在引导卡内实现以下文本布局:
下面的代码在大屏幕上渲染得很好,但在较小的屏幕上,我希望标题移动到正文上方。事实上,它只是被塞进一条长线(无响应)。如何才能实现这一目标?我的代码如下:
超文本标记语言
<div class="card shadow hover-scale-110 mt--100" style="background-color: #F3E500;border-radius: 25px;">
<div class="card-body p-5">
<div style="width: 100%;">
<div class="innerDiv" style="width: 15%;">
<h2 style="font-weight:bold;">Dear fellow Kenyans</h2>
</div>
<div class="innerDiv" style="width: 85%;">
<span>Power is one of the most essential utilities in these difficult times of the COVID-19 pandemic.
As Mobisol, we are extending a caring hand to help equip the more than 27 million Kenyans staying at home in the dark, with no or limited access to power.
Solar energy is easy to acquire, install and inexpensive to use with the sun shining free of charge! We are contributing by making it more affordable and convenient to purchase, transport and install the Mobisol solar power package to benefit these families.
Below are our discounted items categorised according to their specifications.<br/>
</span><br>
<span style="font-style:normal;font-weight:bold;">Please join us in spreading the #PowerOfLove.</span>
</div>
</div>
</div>
</div>
CSS
.innerDiv{
float: left;
width: 100%;
}
饮歌长啸
波斯汪
相关分类