CSS :文本对齐演示

位置: 首页 > 前端三套件
[发布: 2023.7.29  作者: 马黑  阅读: 150]

Life is too short to spend time with people who suck the happiness out of you. If someone wants you in their life, they’ll make room for you. You shouldn’t have to fight for a spot. Never, ever insist yourself to someone who continuously overlooks your worth. And remember, it’s not the people that stand by your side when you’re at your best, but the ones who stand beside you when you’re at your worst that are your true friends.

人生苦短,没有必要和那些令你不快乐的人纠缠。如果那个人需要你,你不需要刻意去做什么,他/她自然会留出你的位置。绝对不要和那些低看了你价值的人在一起。记住,一帆风顺时守在自己身边并不珍贵,当你深陷困境却依然和你并肩在一起的才是真正的朋友。

Only when you understand the true meaning of life can you live truly. Bittersweet as life is, it's still wonderful, and it's fascinating even in tragedy. If you're just alive, try harder and try to live wonderfully.

只有在你了解了人生的真谛后,才能真正地生活。虽然人生苦忧参半,但依旧美妙,而且即使在悲剧中也藏着迷人之处。如果你只是活着,那就再努力点吧,试着活得精彩。

    附一:text-align 属性赋值

	left	左对齐
	center	居中
	right	右对齐
	start	左对齐或右对齐(取决于文本方向)
	end	右对齐或左对齐(取决于文本方向)
	justify	两端对齐(段落的最后一行无效)
	justify-all	全部文本行两端对齐(实验性,各浏览器均不支持,慎用)

	inherit	继承父辈元素的对齐设定
	match-parent	同 inherit 但依据文本方向赋予父辈元素的 start 与 end 含义

    附二:通用强制两端对齐方法

	text-align: justify;
	text-align-last: justify;

    附三:拼音类文本(含数字)以单词结构处理两端对齐,汉字以单字为单位处理两端对齐

前一篇: 让子元素在父元素边界内移动
下一篇: CSS :段首缩进两个汉字

发表评论:

  
 

评论列表 [1条]

#1 | 悄然 于 2023-7-29 08:17 发布: 整齐就是美。。

Copyright © 2023 All Right Reserved 马黑PHP文章管理整站系统v1.8
联系我们: gxblk@163.com