CSS sets the first word enlargement effect (code example)

WBOY
Release: 2018-09-27 13:55:16
Original
3160 people have browsed it

this chapter will introduce you tohow to set the first word amplification effect in css. it has certain reference value. friends in need can refer to it. i hope it will be helpful to you.

in many articles, there is an effect of enlarging the first word, which can also be achieved in css.

this effect is achieved by setting the first word separately in css.

  首字放大  

秋节是远古天象崇拜——敬月习俗的遗痕。据《周礼.春官》记载,周代已有“中秋夜迎寒”、“中秋献良裘”、“中秋夕月(拜月)”的活动;汉代,又在中秋或立秋之日敬老、养老,赐以雄粗饼。晋时亦有中秋赏月之举,不过不太普遍;直到唐代将中秋与嫦娥奔月、吴刚伐桂、玉兔捣药、杨贵妃变月神、唐明皇游月宫等神话故事结合起,使之充满浪漫色彩,玩月之风方才大兴。

北宋,正式定八月十五为中秋节,并出现“小饼如嚼月,中有酥如饴”的节令食品。孟元老《东京梦华录》说:“中秋夜,贵家结饰台榭,民间争占酒楼玩月”;而且“弦重鼎沸,近内延居民,深夜逢闻笙语之声,宛如云外。间里儿童,连宵婚戏;夜市骈阗,至于通晓。”吴自牧《梦梁录》说“此际金风荐爽,玉露生凉,丹桂香飘,银蟾光满。王孙公子,富家巨室,莫不登危楼,临轩玩月,或开广榭,玳筳罗列,琴瑟铿锵,酌酒高歌,以卜竟夕之欢。”

Copy after login

the code is as above, mainly through float and the control of the drop of the first word, and using themark to set the first word separate styles to achieve the purpose of highlighting.

in css, you can also control the first letter of the paragraph by setting the pseudo-category first-letter, and you can also implement the first letter. to achieve the effect of word amplification, change pspan in the above code to p:first-letter.

  首字放大  

秋节是远古天象崇拜——敬月习俗的遗痕。据《周礼.春官》记载,周代已有“中秋夜迎寒”、“中秋献良裘”、“中秋夕月(拜月)”的活动;汉代,又在中秋或立秋之日敬老、养老,赐以雄粗饼。晋时亦有中秋赏月之举,不过不太普遍;直到唐代将中秋与嫦娥奔月、吴刚伐桂、玉兔捣药、杨贵妃变月神、唐明皇游月宫等神话故事结合起,使之充满浪漫色彩,玩月之风方才大兴。

北宋,正式定八月十五为中秋节,并出现“小饼如嚼月,中有酥如饴”的节令食品。孟元老《东京梦华录》说:“中秋夜,贵家结饰台榭,民间争占酒楼玩月”;而且“弦重鼎沸,近内延居民,深夜逢闻笙语之声,宛如云外。间里儿童,连宵婚戏;夜市骈阗,至于通晓。”吴自牧《梦梁录》说“此际金风荐爽,玉露生凉,丹桂香飘,银蟾光满。王孙公子,富家巨室,莫不登危楼,临轩玩月,或开广榭,玳筳罗列,琴瑟铿锵,酌酒高歌,以卜竟夕之欢。”

Copy after login

however, the text with this attribute set does not support some other css styles well, so it is not recommended to use this method.

in addition to first-letter, the pseudo-category first-line can set the style of the first line within the element, giving the above code add a line of code.

  首字放大  

秋节是远古天象崇拜——敬月习俗的遗痕。据《周礼.春官》记载,周代已有“中秋夜迎寒”、“中秋献良裘”、“中秋夕月(拜月)”的活动;汉代,又在中秋或立秋之日敬老、养老,赐以雄粗饼。晋时亦有中秋赏月之举,不过不太普遍;直到唐代将中秋与嫦娥奔月、吴刚伐桂、玉兔捣药、杨贵妃变月神、唐明皇游月宫等神话故事结合起,使之充满浪漫色彩,玩月之风方才大兴。

北宋,正式定八月十五为中秋节,并出现“小饼如嚼月,中有酥如饴”的节令食品。孟元老《东京梦华录》说:“中秋夜,贵家结饰台榭,民间争占酒楼玩月”;而且“弦重鼎沸,近内延居民,深夜逢闻笙语之声,宛如云外。间里儿童,连宵婚戏;夜市骈阗,至于通晓。”吴自牧《梦梁录》说“此际金风荐爽,玉露生凉,丹桂香飘,银蟾光满。王孙公子,富家巨室,莫不登危楼,临轩玩月,或开广榭,玳筳罗列,琴瑟铿锵,酌酒高歌,以卜竟夕之欢。”

Copy after login

as you can see, the first line of text in each paragraph is underlined. in addition, the pseudo-category in the css attribute there are many specific ways to use it.

Related labels:
css
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
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!