CSS 控制文字两端对齐
<html>
<head>
<style>
td:after {
content: '';
}
td p{
font-size: 14px;
width: 5em;/*调整文字间距*/
text-align-last: justify!important;/*自适应文本宽度*/
}
</style>
</head>
<body>
<table>
<tbody>
<tr>
<td> <input type="checkbox" name="SearchChk" id="chk_cgCompanyID" /></td>
<td> <p>出库公司</p> </td>
<td> <input name="CompanyID" id="cgCompanyID" class="easyui-textbox" /></td>
<td> <input type="checkbox" name="SearchChk" id="chk_cgCompanyID" /></td>
<td> <p>设置密码</p></td>
<td> <input name="CompanyID" id="cgCompanyID" class="easyui-textbox" /></td>
</tr>
<tr>
<td> <input type="checkbox" name="SearchChk" id="chk_cgCompanyID" /></td>
<td> <p>确认密码</p></td>
<td> <input name="CompanyID" id="cgCompanyID" class="easyui-textbox" /></td>
<td> <input type="checkbox" name="SearchChk" id="chk_cgCompanyID" /></td>
<td> <p>手机</p></td>
<td> <input name="CompanyID" id="cgCompanyID" class="easyui-textbox" /></td>
</tr>
<tr>
<td> <input type="checkbox" name="SearchChk" id="chk_cgCompanyID" /></td>
<td> <p>邮箱</p></td>
<td> <input name="CompanyID" id="cgCompanyID" class="easyui-textbox" /></td>
</tr>
</tbody>
</table>
</body>
</html>
实现效果

text-justify基本语法
参数:
auto :允许浏览器用户代理确定使用的两端对齐法则 ;
inter-word :通过增加字之间的空格对齐文本,该行为是对齐所有文本行最快的方法,它的两端对齐行为对段落的最后一行无效 ;
newspaper : 通过增加或减少字或字母之间的空格对齐文本,是用于拉丁文字母表两端对齐的最精确格式 ;
distribute :处理空格很像newspaper,适用于东亚文档,尤其是泰国 ;
distribute-all-lines :两端对齐行的方式与distribute相同,也同样不包含两段对齐段落的最后一行,适用于表意字文档 ;
inter-ideograph : 为表意字文本提供完全两端对齐。他增加或减少表意字和词间的空格 。
参考:
https://www.cnblogs.com/sapho/p/5999603.html
https://www.cnblogs.com/nangezi/p/9042973.html
CSS 控制文字两端对齐的更多相关文章
- CSS实现文字两端对齐
最近的项目遇到了这样的需求:(要求标题部分不管文字多少,都必须两端对齐) 如下图: 当时也没有多想直接使用‘ ’进行代替,毕竟产品同学想快一点看到效果,不敢怠慢!不过到第二个页面就傻眼了. 如图: 这 ...
- css text-align文字两端对齐
text-align:start | end | left | right | center | justify | match-parent | justify-all justify: 内容两端对 ...
- 使用css让文字两端对齐
text-align:justify; text-justify:distribute-all-lines; text-align-last:justify;可以让文字实现两端对齐
- css中文字两端对齐兼容IE
text-align: justify; text-justify:inter-ideograph;
- css文字两端对齐
css文字两端对齐 text-align:Justify(火狐); text-justify:inter-ideograph(IE) text-justify(IE) 基本语法 text-justif ...
- p标签text-align:justify以及CSS文字两端对齐
p标签样式添加text-align:justify; 那么就会左右对齐. 使用前: 使用后: CSS文字两端对齐 使用前: 代码: <style> div{ width:100px; he ...
- 实现段落文字两端对齐的css样式
有时候网站中的文字比较多,虽然为父元素设置了宽度,但是总是会出现两端参差不齐的情况,看起来不整齐.其实实现段落的两端对齐,只需要设置两个css 样式即可. .demo{ text-align: jus ...
- css实现表单label文字两端对齐
如图,在我们写页面的时候,经常遇到这种的情况,而需求是想让label文字两端对齐,我们来看看如何用css解决 /**css代码**/ ul li{ list-style: none; } .info- ...
- 可用的CSS文字两端对齐
最近在工作项目中接触到Web界面设计的问题,要实现文字两端对齐的效果.在网上搜索了一下,用的都是类似的技巧: text-align:justify;text-justify:inter-ideogra ...
随机推荐
- .net core入门-跨域访问配置
Asp.net Core 跨域配置 一般情况WebApi都是跨域请求,没有设置跨域一般会报以下错误 No 'Access-Control-Allow-Origin' header is prese ...
- Define the Data Model and Set the Initial Data 定义数据模型并设置初始数据
This topic describes how to define the business model and the business logic for WinForms and ASP.NE ...
- 尉蓝色的P2P金融众筹平台手机模板
蓝色的p2p金融投资众筹网手机模板html整站下载.实用的众筹app手机模板下载.主要页面有:众筹项目.发布.个人中心.登录.注册.优惠券.回报.项目详情.我要支持.帮助中心等总共37个手机页面. 模 ...
- grep命令提示"binary file matches **.log"解决方法
仔细想想,这个问题遇到很多次了,之前一直以为很复杂,一搜索发现解决这么简单,记录一下做备忘. grep test XXX.log Binary file app.log matches 此时使用-a参 ...
- echarts地图map城市间如何连线
let bjData = [ [{name:'北京'}, {name:'上海',value:95}], [{name:'北京'}, {name:'广州',value:90}]]; let conver ...
- QML::基本属性类型
QML基本属性类型
- iOS中的NSOperation线程
1.除NSThread之外的第二种多线程的编程方法 2.采用NSOperation(线程操作,通常用他的子类)和NSOperationQueue(线程队列)搭配来做多线程开发,采用NSOperat ...
- Hystrix工作流
Hystrix工作流程图: 流程图详解 1. 构造HystrixCommand对象或者HystrixObservableCommand对象 构造HystrixCommand 或HystrixObser ...
- securecrt如何保存操作日志
- 删除带外键的表【foreign key constraint fails】报错
title: 删除带外键的表[foreign key constraint fails]报错 date: 2018-08-02 21:59:06 tags: 数据库 --- 遥想当时正在学hibern ...