iT邦幫忙

2018 iT 邦幫忙鐵人賽
DAY 8
0
Modern Web

挑戰 CSS 30 天系列 第 8

day8_direction

direction 屬性是用來設定文字的方向。可能的值為 'ltr' 與 'rtl'。

如以下範例:

<!DOCTYPE html>
<html>
<head>
  <title>CSS direction</title>
  <meta charset="utf-8">
  <style type="text/css">
	#p1{
		direction:ltr; 
	}
	#p2{
		direction:rtl; 
	}
  </style>
</head>
<body>
    <p id="p1">LTR 方向</p>
	<p id="p2">RTL 方向</p>
</body>
</html>

成果,LTR 方向會在左邊,RTL 方向在右邊。


上一篇
day7_cursor
下一篇
day9_letter-spacing&line-height
系列文
挑戰 CSS 30 天30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言