<style>
.box{
width: 1000px;
height: 500px;
background-color: #aa0000;
margin:0 auto;
}
.tester{
width: 100px;
height: 100px;
background-color: #44931c;
color:#fff;
text-align: justify;
} .tester>span{
/*display: inline-block;*/
padding-left: 100%;
}
</style>
<div class="box">
<div class="tester">
你好呀 <span></span>
</div>
</div>

  

CSS笔记---文字两边对齐的更多相关文章

  1. 使用CSS达到文字首尾对齐效果

    在制作表单的时候经常会遇到需要不同个数的文字首尾对齐,比如: <span>姓名:</span> <span>联系方式:</span> 姓名: 联系方式: ...

  2. CSS技巧-文字分散对齐的方法

    下面的代码可以在IE中实现文字分散对齐: <table width="300" align="center">    <tr>      ...

  3. CSS实现文字两端对齐

    最近的项目遇到了这样的需求:(要求标题部分不管文字多少,都必须两端对齐) 如下图: 当时也没有多想直接使用‘ ’进行代替,毕竟产品同学想快一点看到效果,不敢怠慢!不过到第二个页面就傻眼了. 如图: 这 ...

  4. css text-align文字两端对齐

    text-align:start | end | left | right | center | justify | match-parent | justify-all justify: 内容两端对 ...

  5. CSS图标文字不对齐

    页面排版经常遇到‘图标+文字’的需求,正常样式写下来是这样 ​, 但产品要的应该是长这样 ​,怎么办呢?其实很简单,加个样式看看 vertical-align: top/middle/bottom; ...

  6. 使用css让文字两端对齐

    text-align:justify; text-justify:distribute-all-lines; text-align-last:justify;可以让文字实现两端对齐

  7. CSS 控制文字两端对齐

    <html> <head> <style> td:after { content: ''; } td p{ font-size: 14px; width: 5em; ...

  8. css中文字两端对齐兼容IE

    text-align: justify; text-justify:inter-ideograph;

  9. 测开之路九十三:css之文字样式和段落对齐

    引用css 字体族 字体类型和尺寸 em:字体按倍数缩放 font-weight:调整文字的粗细 段落对齐:text-align 左对齐:left 右对齐:right 居中对齐:center 两边对齐 ...

随机推荐

  1. delphi 获取 TreeView选中的文件路径

      //获取 TreeView选中的文件路径 unit Unit1; interface uses  Windows, Messages, SysUtils, Variants, Classes, G ...

  2. ListView上移 和下移

              有问题 //ListBox选中的项目移动到第1位   Listbox1.Items.Move(ListBox1.ItemIndex,0); //ListView选中的项目移动到第1 ...

  3. [AngularJS] Introduction to ui-router

    Introduce to basic $stateProvider.state() with $stateParams services. Understand how nested router w ...

  4. Asp.net关闭弹出窗口刷新父窗口

    通常情况下,关闭窗口时不需要对父窗口做任何操作,但如果子窗口是某一对象的修改画面,这时,当关闭子窗体时就需要对父窗口刷新,刷新可以通过三种方式来实现:1,采用window.opener.locatio ...

  5. ckfinder动态指定上传路径

    默认情况下无法用代码修改config.ascx中的BaseUrl设置,因为其后端代码ConfigFile中并没有提供修改BaseUrl的方法,这里我借用了fckeditor以前的用法:利用sessio ...

  6. 通用PE u盘启动盘制作

    导读 通用pe工具箱是现在最老牌的的U盘装系统和维护电脑的专用工具之一,一键式制作.操作简单便捷,几乎100%支持所有U盘,不再为装机烦恼们,抓紧时间下载通用pe工具箱体验下吧. 准备工作 ①从通用p ...

  7. js里一些经典的算法

    //1.找出某个数字在一组数组内的存不存在 如果存在 找出他所在的索引. function indexOf(arr,item){ var i; if(Array.prototype.indexOf){ ...

  8. CSS skills: 6) auto hide the top bar javascript

    //jquery $(document).ready(function(){ $(window).scroll(function() { $(this).scrollTop() > 10 ? $ ...

  9. python(5)–datetime模块

    1. datatime.date.today()     当前日期 >>> import datetime >>> datetime.date.today() da ...

  10. Apache服务器中配置虚拟机的方法

    新浪微博虚拟机开发配置步骤及介绍.1.由于后面虚拟机中需要用到Rewrite所以先编辑Apache的conf目录下的httpd.conf文件.(可根据实际需要操作)添加mod_rewrite.so模块 ...