Css DIV无缘无故地偏离了路线?
我想不出来 我将4个Css DIV无缘无故地偏离了路线?,css,html,Css,Html,我想不出来 我将4个div设置为display:inline block。出于某种原因,左下角的div想要错误对齐 HTML看起来很干净。CSS也是如此 服务 域和托管 需要设置域名和网络托管帐户吗?不知道从哪里开始?交给我吧 定制设计 增强个人或企业形象并满足目标受众需求的网页设计 响应性设计 我要确保你的网站无论在哪台设备上浏览都很好看,让你和你的网站进入移动世界 维修 维护和更新你的网站是一个经常被忽视的必要条件。把这项任务交给我,每月收取一定的费用 .服务{ 显示:内联块; 利润率:
div
设置为display:inline block
。出于某种原因,左下角的div想要错误对齐
HTML看起来很干净。CSS也是如此
服务
域和托管
需要设置域名和网络托管帐户吗?不知道从哪里开始?交给我吧
定制设计
增强个人或企业形象并满足目标受众需求的网页设计
响应性设计
我要确保你的网站无论在哪台设备上浏览都很好看,让你和你的网站进入移动世界
维修
维护和更新你的网站是一个经常被忽视的必要条件。把这项任务交给我,每月收取一定的费用
.服务{
显示:内联块;
利润率:20px;
背景:粉红色;
}
.serviceTitle{
文本对齐:居中;
字号:600;
宽度:400px;
高度:56px;
颜色:#fff;
背景:url(../\u images/title.png);
边缘底部:10px;
}
.serviceText{
高度:200px;
宽度:400px;
背景:红色;
}
将垂直对齐:顶部
添加到div元素。使用垂直对齐:顶部设置div.service css 这只需在不使用css的情况下完成,将对齐部分添加到div中,如下所示:
<div align="left">
\\or
<div align="right">
\\or
<div align="center">
\\etc...
\\或
\\或
\\等等。。。
添加到每个div标记,使其如下所示:
<section class="top" data-type="background" data-speed="10" class="pages">
<section id="s">
<div align="left" class="title">Services</div>
<div align="left" class="service">
<div align="left" class="serviceTitle"><h2>Domain & Hosting</h2></div>
<div align="left" class="serviceText"><p>Need to set up a domain name and web hosting account? Not sure where to start? Leave it to me!</p></div>
</div>
<div align="left" class="service">
<div align="left" class="serviceTitle"><h2>Bespoke Design</h2></div>
<div align="left" class="serviceText"><p>Web design which enhances your individual or business's image and caters to your target audience's needs.</p></div>
</div>
<div align="left" class="service">
<div align="left" class="serviceTitle"><h2>Responsive Design</h2></div>
<div align="left" class="serviceText"><p>I make sure your site looks great no matter which device it is viewed on, bringing you and your website into the mobile world.</p></div>
</div>
<div align="left" class="service">
<div align="left" class="serviceTitle"><h2>Maintenance</h2></div>
<div align="left"class="serviceText"><p>Maintaining and updating your web presense is a necessity that can often be overlooked. Leave the task to me for a set monthly fee.</p></div>
</div>
</section>
</section>
服务
域和托管
需要设置域名和网络托管帐户吗?不知道从哪里开始?交给我吧
定制设计
增强个人或企业形象并满足目标受众需求的网页设计
响应性设计
我要确保你的网站无论在哪台设备上浏览都很好看,让你和你的网站进入移动世界
维修
维护和更新你的网站是一个经常被忽视的必要条件。把这项任务交给我,每月收取一定的费用
这是用于左对齐的,只需根据我为满足您的需要而编写的第一组标记进行更改即可这是一把小提琴,非常好!谢谢这很奇怪,因为它已经很好地工作了,直到我把它简化了一点,然后它开始出现问题。奇怪的
<section class="top" data-type="background" data-speed="10" class="pages">
<section id="s">
<div align="left" class="title">Services</div>
<div align="left" class="service">
<div align="left" class="serviceTitle"><h2>Domain & Hosting</h2></div>
<div align="left" class="serviceText"><p>Need to set up a domain name and web hosting account? Not sure where to start? Leave it to me!</p></div>
</div>
<div align="left" class="service">
<div align="left" class="serviceTitle"><h2>Bespoke Design</h2></div>
<div align="left" class="serviceText"><p>Web design which enhances your individual or business's image and caters to your target audience's needs.</p></div>
</div>
<div align="left" class="service">
<div align="left" class="serviceTitle"><h2>Responsive Design</h2></div>
<div align="left" class="serviceText"><p>I make sure your site looks great no matter which device it is viewed on, bringing you and your website into the mobile world.</p></div>
</div>
<div align="left" class="service">
<div align="left" class="serviceTitle"><h2>Maintenance</h2></div>
<div align="left"class="serviceText"><p>Maintaining and updating your web presense is a necessity that can often be overlooked. Leave the task to me for a set monthly fee.</p></div>
</div>
</section>
</section>