如何利用CSS实现首字下沉效果_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:31:35
Original
1631 people have browsed it

如何利用CSS实现首字下沉效果:
建议:尽可能的手写代码,可以有效的提高学习效率和深度。
首字下沉效果可能在实际应用中并不常见,但并非是没有这样的应用,效果确实也是比较绚丽,在word中就有这样的设置,下面就来简单介绍一下如何利用CSS实现这种效果。代码实例如下:

<!DOCTYPE html><html><head><meta charset=" utf-8"><meta name="author" content="http://www.softwhy.com/" /><title>蚂蚁部落</title><style type="text/css">div {  width: 150px;  height: 150px;  border: 1px solid green;}div:first-letter {  font-size: 36px;  color: #f60;  padding: 4px;}</style></head><body><div>蚂蚁部落欢迎您,希望大家给予有意见的建议和意见</div></body></html>
Copy after login

实现以上功能主要是利用first-letter属性实现的。

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=4653

更多内容可以参阅:http://www.softwhy.com/divcss/

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!