SEARCH !!

2010/02/26

10 golden rules for building successful web apps, from Fred Wilson

Fred Wilson from Union Square Ventures opened up Future of Web Apps in Miami this morning with his top ten tips for creating a successful web app:

CSS圓角

阿度仔
http://nate.koechley.com/talks/labs/six-css-techniques-explained.html

傳統方法
http://atedev.wordpress.com/2007/11/01/css-%E5%9C%93%E8%A7%92%E6%8A%80%E8%A1%93/

CSS3
http://dancewing.pixnet.net/blog/post/24572362

如何使用swfObject

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>如何使用swfObject</title>

關於wmode

根據官方的flash文件當中指出,wmode屬性有效值有下面三種:

Window
plays the application in its own rectangular window on a web page. Window indicates that the Flash application has no interaction with HTML layers and is always the topmost item.






在html嵌入swf 時的最基本code

<object width="987" height="361">
    <param name="movie" value="swf/mainTest.swf" />
    <embed src="swf/mainTest.swf" width="987" height="361" allowScriptAccess="always" wmode="transparent"></embed>
</object>

2010/02/25

解決用swfOject 嵌入的swf 無法置中問題

something {
text-align: center;
}

swfObject wmode

解決swfObject 無法背景透明問題

<script type="text/javascript" src="swfObject/swfobject.js"></script>
<script type="text/javascript">

var flashvars = {}; <--做一個空的為了下方塞參數用
var params = {};
params.wmode = "transparent";

swfobject.embedSWF("swf/mainTest.swf", "mainSWF", "987", "361", "9.0.0", "swfObject/expressInstall.swf", flashvars, params); <--參數有順序性,所以要塞flashvars

</script>

2010/02/24

[CSS Hack] 解決IE6、IE7、IE8、Firefox的瀏覽器相容性問題!

每次調CSS最令人頭痛的就是瀏覽器校正問題,因為每個瀏覽器對CSS的解釋都不太一樣,Firefox本身算是比較照規矩來,處理上比較簡單,但是遇到微軟的IE系列頭就大了,雖然都是IE,但是IE6、IE7、IE8各版本對CSS的解釋又不一樣,就算你本身已經在IE6調整好,但是在IE7看起來又是不一樣,這時我們就得來對各個瀏覽器設定不同的數值來解決版面移位的問題。

2010/02/12

HTML Character Entity Encoding Part2

HTML Character Entity Encoding Part1

CSS選擇器怪招

a.p1:hover .large

class=p1 的 <a> 在hover時 , 裡面 class=large的東西的狀態

------------------------------------------------------------

input[type="text"]

type屬性為text的input

SWF嵌入html時需注意

SWF嵌入html時必須要在<object/>加入 allowScriptAccess="always"

SWF才可以在網頁中順利執行

解決IE6不支援css min-width與min-height

min-width與min-height在css中是相當好用的語法,可以讓HTML元素最少仍保持一定的寬和高,

而需要時仍隨著元素的內容增加寬和高。

這麼好用的語法,偏偏IE 6不支援,不過說不支援也不精確,事實上IE6本身在指定height與width的值時,就具有min-width和min-height的特性,只是如果單純用height或width來指定,到了Firefox或IE 7時,又會把它當作是鎖死的值,不會因內容增加而擴大元素的box。

常用的CSS命名規則

一、常用的CSS命名規則
頭:header
內容:content/container
尾:footer
導航:nav

CSS各瀏覽器專有屬性標示法

各瀏覽器的專有屬性標示法如下:

Safari: -webkit-
Firefox: -moz-
Konqueror: -khtml-
Opera: -o-
IE: -ms- ( IE 只有 IE8 支援 -ms- )