BloggerAds廣告

相關文章

2014年12月10日 星期三

font-weight: bold not works in safari

given CSS

@font-face {

 font-family: Frutiger;

 src: url('../fonts/frutiger_ce_45_light.otf'),

   url('../fonts/frutiger_ce_45_light.ttf') format('truetype'),

   url('../fonts/frutiger_ce_45_light.woff') format("woff"),

   url('../fonts/frutiger_ce_45_light.eot') format('embedded-opentype'),

   url('../fonts/frutiger_ce_45_light.eot?#iefix') format('embedded-opentype');

}



.someBoldFont {

 font-family: Frutiger;

}

<span class="someBoldFont">hello world</span>
you'll notice that the word wont bold in Safari


here are the solution


@font-face {

 font-family: Frutiger;



 /* add this 2 style rule */

 font-weight: normal;

 font-style: normal;

 /* end add */



 src: url('../fonts/frutiger_ce_45_light.otf'),

   url('../fonts/frutiger_ce_45_light.ttf') format('truetype'),

   url('../fonts/frutiger_ce_45_light.woff') format("woff"),

   url('../fonts/frutiger_ce_45_light.eot') format('embedded-opentype'),

   url('../fonts/frutiger_ce_45_light.eot?#iefix') format('embedded-opentype');

}

2014年11月24日 星期一

solve safari weird display when resize problem

the image shows the weired layout display at safari when resizing the html page

it looks totally fuxked up, but the HTML are just fine actually when you select any items on the page, because safari just render the graphic wrongly.

the problem causes is that i used negative z-index in my CSS

to solve it, simply change all negative z-index to >=0

2014年10月3日 星期五

php email 標題 主旨 寄件者 亂碼問題

<?php
function emailEncode($str) {
  return "=?UTF-8?B?".base64_encode($str)."?=";
}

$subject = emailEncode("hello world");
$sender = emailEncode("littleshell");
?>