web前端

1.动态增加div内容,且保持所添加的内容一直保持居中。代码如下:

<div style="text-align: center; overflow: hidden;">
<div class="zc" style="width: 25%; float: left;">
<span style="font-family: '微软雅黑'; font-size: 30px;">总资产<br/><span style="font-family: '微软雅黑'; color: red;font-size: 40px;">8989</span></span>
</div>
<div class="zco" style="width: 25%; float: left;">
<span style="font-family: '微软雅黑'; font-size: 30px;">总资产<br/><span style="font-family: '微软雅黑'; color: red;font-size: 40px;">8989</span></span>
</div>
<div class="zct" style="width: 25%; float: left;">
<span style="font-family: '微软雅黑'; font-size: 30px;">总资产<br/><span style="font-family: '微软雅黑'; color: red;font-size: 40px;">8989</span></span>
</div>
<div class="zctt" style="width: 25%; float: left;">
<span style="font-family: '微软雅黑'; font-size: 30px;">总资产<br/><span style="font-family: '微软雅黑'; color: red;font-size: 40px;">8989</span></span>
</div>
</div>

2.web页面为了较好的在手机上显示:

所有页面布局代码如下:

<div id="main" style="width: 100%;">
<div id="header" style="width: 980px;background: black;height: 500px;margin: 0 auto;">

</div>
<div id="header" style="width: 980px;background: orange;height: 500px;margin: 0 auto;margin-top: 20px;">

</div>
<div id="footer" style="width: 980px;background: red;height: 500px;margin: 0 auto;margin-top: 20px;">

</div>
</div
3.为了web页面的小图标在手机上不出现错位,比如在input标签里面还有一个小图标,如果小图标是定位上去的话,在手机上会出现错位,正确的代码书写如下:

<input type="text" style="background: #FFF url(skin/logn_1_03.jpg) 8px center no-repeat;" />  就是在标签的里面加上背景图片,这是正确的做法。









评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值