Html 图像和文本之间的空白,以及当我使用图像边距来粘贴文本响应布局时,都不起作用
Html 图像和文本之间的空白,以及当我使用图像边距来粘贴文本响应布局时,都不起作用,html,css,whitespace,responsive,Html,Css,Whitespace,Responsive,图像和文本之间的空白,以及我使用图像边距来粘贴文本响应布局时,这些空白不起作用 当我使用marginleft粘贴两个div时 由于留有边距,图像未在下部屏幕中居中 HTML代码: <section id="aa-about-us"> <div class="container"> <div class="row"> <div class="col-md-12"> <div class="
图像和文本之间的空白
,以及我使用图像边距来粘贴文本响应布局时,这些空白不起作用
当我使用marginleft
粘贴两个div时
由于留有边距,图像未在下部屏幕中居中
HTML代码:
<section id="aa-about-us">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="aa-about-us-area">
<div class="row">
<div class="aa-title">
<h2>Nature's Paradise</h2>
<span></span>
</div>
<div class="col-md-5">
<div class="aa-about-us-left">
<img src="img/homepagecontent1.jpg" alt="image">
</div>
</div>
<div class="col-md-7">
<div class="aa-about-us-right">
<div class="text-right">
<p>Karjat is an idyllic town and an upcoming taluka of Raigad district for various development projects.<br/> Situated on the western coast on India, Karjat lies in the downhill of Matheran which is the nearest hill station to Mumbai.<br/> The upside being it comes under the MMRDA development zone and the responsibility for planning is entrusted with CIDCO.<br/>
Karjat is Strategically located in the centre of the golden triangle viz. Mumbai, Pune and Nashik, It is well connected with for lane roads and a strong railway network.<br/> Karjat is a railway junction between Mumbai-Pune on Central line.<br/>
Karjat is an educational hub as there are many Engineering, Medical Pharmacy, Management colleges and Marine academy.<br/>
Project in Raigad district like Reliance SEZ, Navi Mumbai SEZ, International Airport (Navi Mumbai), largest exhibition centre (Panvel) and Terminus Railways Stations (Panvel) etc.<br/> Is enhancing the growth in all fronts required to further fuel Karjat and turn it in to preferred first/second home destinations which is a growth centred destination.<br/>
Because of its green and pollution free environment many Bollywood Stars, industrialist, businessmen and corporates have their private farm house in Karjat thus evolving as prime weekend gateway destination.<br/>
MMRDA has planned to develop a part of area in Karjat-Khopoli belt as recreational hub.<br/> On the horizon are T20 Cricket League Ground, Paint Ball Park, Theme Park, Amusement Park and golf course.
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
因为您使用的是引导框架,所以每列都有预定义的15px左右填充。清除那些填充物 这样做,
.col-md-5,.col-md-7{
padding:0px;
}
因为您使用的是引导框架,所以每列都有预定义的15px左右填充。清除那些填充物 这样做,
.col-md-5,.col-md-7{
padding:0px;
}
将一些类添加到图像和内容的父div,并使用这些类覆盖填充 HTML:
<div class="col-md-5 image-container">
<div class="aa-about-us-left">
<img src="img/homepagecontent1.jpg" alt="image">
</div>
</div>
<div class="col-md-7 content-container">
<div class="aa-about-us-right">
<div class="text-right">
<p>Text</p>
</div>
</div>
</div>
将一些类添加到图像和内容的父div,并使用这些类覆盖填充 HTML:
<div class="col-md-5 image-container">
<div class="aa-about-us-left">
<img src="img/homepagecontent1.jpg" alt="image">
</div>
</div>
<div class="col-md-7 content-container">
<div class="aa-about-us-right">
<div class="text-right">
<p>Text</p>
</div>
</div>
</div>