HTML/CSS之段落排版_html/css_WEB-ITnose
段落排版之首行缩进
中文文字中的段前习惯空两个文字的空白,这个特殊的样式可以用下面代码来实现:
p{text-indent:2em;},在head头里面写上下面的代码
<style type="text/css">p{text-indent:2em;}</style><strong>注意:2em的意思就是文字的2倍大小。</strong><span style="color:#FF0000;">text-indent</span>就是缩进的意思
段落排版之行间距
<span style="font-size:18px;"><strong><span style="color:#FF0000;">p{line-height:1.5em;}</span></strong></span>
段落排版--字间距、字母间距
如果想在网页排版中设置文字间隔或者字母间隔就可以使用 letter-spacing来实现
h1{letter-spacing:20px};
如果我想设置英文单词之间的间距呢?可以使用word-spacing来实现。如下代码:
h1{word-spacing:20px;}
段落排版--对齐
想为块状元素中的文本、图片设置居中样式吗?可以使用text-align样式代码

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The article discusses the HTML <datalist> element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

The article discusses the <iframe> tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

The article discusses the HTML <progress> element, its purpose, styling, and differences from the <meter> element. The main focus is on using <progress> for task completion and <meter> for stati

The article discusses the HTML <meter> element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates <meter> from <progress> and ex

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

This article explains the HTML5 <time> element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit
