在 LESS 看到的:
.rounded_corners {
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
}
軟體開發、伺服器和生活瑣事
在 LESS 看到的:
.rounded_corners {
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
}
今天遇到的鳥問題:CSS 中真正的 width 要等於 margin + border + padding + 設定的 width。
假設原本的 DIV 設定如下:
.box {
width: 800px;
}
若要讓原本的區塊寬度不變但要加上 20px 的 padding 必須這樣設定:
.box-padding {
padding-left: 20px;
padding-right: 20px;
width: 760px; /* 800 - 20 - 20 = 760 */
}
祝大家新年快樂 && 情人節快樂!!!
ps. 這篇好短啊 … 囧
一般來說 scanf 遇到空白、t、n 就會自動中斷:
scanf("%s",str); // 輸入「hello world」
printf("%s",str); // 輸出「hello」
剛剛發現 scanf 可以自定欲接收的字元,改一下就可以接收空白等字元:
scanf("%[^n]",str); // 接收除了 n 以外的所有字元
printf("%s",str); // 輸出完整的「hello world」
參考資料:C Gossip: printf() 與 scanf()
http://caterpillar.onlyfun.net/Gossip/CGossip/PrintfScanf.html