• 換行 的效果,可以使用 <pre></pre>標籤
  • <th> 標籤的預設樣式是粗體和置中
  • <td>中的文字則會靠左對齊。

font-size

Flexible type with :root

1vmin = 1vw or 1vh, whichever is smaller 長或寬較小的那個的百分比
1vmax = 1vw or 1vh, whichever is larger 長或寬較大的那個的百分比

font-size: 5vmin;
font-size: calc(16px + (24 - 16) * (100vw - 320px) / (2560 - 320));

e.g.: browser viewport is set to 1,000 x 1,200 pixels:
1.5vw = 15px font size
1.5vh = 18px font size
1.5vmin = min(1.5vw, 1.5vh) = 15px font size

e.g.:The viewport dimensions of the iPhone 7 (current version at the time of this post), which is 375x667, the calculated value of :root would be:

:root {
  font-size: calc(3.75px + 6.67px + 1.875px); /* 1vw + 1vh + .5min */
}

text-indent: 20px;
 letter-spacing: 0px;
 text-align: center;

div 和 button 內的文字

button 內的文字會預設 垂直和水平置中
div 內的文字會預設 在左上角
codepen link

.div-2 {
  text-align: center; /* 水平置中 */
  line-height: 100px; /* 垂直置中 和 容器同高 */
}ˊ

html symbol codes

在HTML中加入特殊符號,HTML CODE
html symbol codes


#text-propety #font-size #text-align #line-height #文字置中







Related Posts

用 React hooks 實作一個 todo list

用 React hooks 實作一個 todo list

基礎 JavaScript 語法

基礎 JavaScript 語法

Fetch & Promise

Fetch & Promise


Comments