段落排版--中文字间距、字母间距(letter-spacing, word-spacing)
中文字间隔、字母间隔设置:
如果想在网页排版中设置文字间隔或者字母间隔就可以使用 letter-spacing 来实现,如下面代码:
h1{
letter-spacing:50px;
}
...
<h1>了不起的盖茨比</h1>
注意:这个样式使用在英文单词时,是设置字母与字母之间的间距。
单词间距设置:
如果我想设置英文单词之间的间距呢?可以使用 word-spacing 来实现。如下代码:
h1{
word-spacing:50px;
}
...
<h1>welcome to here!</h1>
示例:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>字间距</title>
<style type="text/css">
h1{letter-spacing:20px;font-size:20px;}
p{word-spacing:20px;}
#pp{letter-spacing:20px;
</style>
</head>
<body>
<h1>hello world, hello rinpe !</h1>
<hr/>
<p>hello world, hello rinpe !</p>
<hr/>
<p id="pp">我的名字叫xxxxx</p>
</body>
</html>
效果:

段落排版--中文字间距、字母间距(letter-spacing, word-spacing)的更多相关文章
- Web前端开发基础 第四课(CSS文字和段落排版)
文字排版--字体 我们可以使用css样式为网页中的文字设置字体.字号.颜色等样式属性.下面我们来看一个例子,下面代码实现:为网页中的文字设置字体为宋体. body{font-family:" ...
- iOS UIButton文字和图片间距随意调整
代码地址如下:http://www.demodashi.com/demo/11606.html 前记 在开发中,我们经常会遇到这么一种情况,就是一个按钮上面有图片也有文字,但是往往设计并不是我们想要的 ...
- word里输入英文字母间距变宽,字体改变,怎么回事?
word里输入英文字母间距变宽,字体改变,怎么回事? 你有没有遇到下面这种情况,在word里输入英文,变的很奇怪,就像下面图中那样: 是不是很蛋疼?看起来很别扭. 那是因为输入法是全角状态 我们只要把 ...
- 字母间距letter-spacing
效果图: 字母间距CSS: h1 {letter-spacing:2px} h2 {letter-spacing:-3px}
- Bootstrap_排版_文字样式
一.段落 段落是排版中另一个重要元素之一.在Bootstrap中为文本设置了一个全局的文本样式(这里所说的文本是指正文文本): 1.全局文本字号为14px(font-size). 2.行高为1.428 ...
- [Swift]LeetCode345. 反转字符串中的元音字母 | Reverse Vowels of a String
Write a function that takes a string as input and reverse only the vowels of a string. Example 1: In ...
- leetCode题解之反转字符串中的元音字母
1.问题描述 Reverse Vowels of a String Write a function that takes a string as input and reverse only the ...
- C#LeetCode刷题之#345-反转字符串中的元音字母(Reverse Vowels of a String)
问题 该文章的最新版本已迁移至个人博客[比特飞],单击链接 https://www.byteflying.com/archives/3935 访问. 编写一个函数,以字符串作为输入,反转该字符串中的元 ...
- 转载: 黄聪:C#中 Excel列字母与数字的转换
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
随机推荐
- Ruby安装和简介
Ruby下载地址:https://www.ruby-lang.org/zh_cn/downloads/ 我安装的是RubyInstaller.it is a self-contained Window ...
- R语言 一元线性回归
#一元线性回归的基本步骤#1.载入数据 给出散点图 x<-c(0.10,0.11,0.12,0.13,0.14,0.15,0.16,0.17,0.18,0.20,0.21,0.23) y< ...
- rt: Unknown command 'PATH='
- Java项目中使用配置文件配置
private String readConfig() { Properties p = new Properties(); InputStream in = getClass().getClassL ...
- 【转】蓝牙物理链路类型:SCO和ACL链路
原文网址:http://blog.chinaunix.net/uid-23193900-id-3272233.html 蓝牙物理链路ACL(Asynchronous Connectionless), ...
- 【转】SendMessage及WPRAME、LPARAME
原文网址:http://www.cnblogs.com/renyuan/archive/2012/11/26/2789103.html SendMessage及WPRAME.LPARAME typed ...
- 利用NSIS软件制作C#安装包
最近在做C#程序安装包,结果网上看到这个软件还是不错的,可以尝试以下. NSIS 是“Nullsoft 脚本安装系统”(Nullsoft Scriptable Installation System) ...
- Linux学习笔记4——函数调用栈空间的分配与释放
一.函数执行时使用栈空间作为自己的临时栈,3种方式决定编译器清空栈的方式:__stdcall. __fastcall.__cdecl 1.__stdcall表示每个调用者负责清空自己调用的函数的临时栈 ...
- Linux给用户增加sudo权限
有时候我们在Linux下执行sudo的时候,出现 xxx is not int the sudoers file 告诉我们当前用户不是sudoer,所以我们要把当前用户添加进去,步骤如下: 1.进入超 ...
- myeclipse svn
打开myeclipse的help---install from site 点击add弹出对话框 在输入框中输入对应内容 http://subclipse.tigris.org/update_1.10. ...