溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

HTML&CSS設(shè)計(jì)與構(gòu)建網(wǎng)站 筆記HTML

發(fā)布時(shí)間:2020-06-06 11:41:53 來(lái)源:網(wǎng)絡(luò) 閱讀:466 作者:bysowhat 欄目:web開發(fā)

1.<p>中的特殊符號(hào)

    當(dāng)瀏覽器遇到2個(gè)或更多的空格(回車)會(huì)顯示成一個(gè)空格。


&nbsp;  空格

&amp;   &

&lt;       <

&gt;      >

&quot;   "

&qpos;   '

<br /> 回車

2.語(yǔ)義標(biāo)記


<em> 重點(diǎn)文字

<blockquote>  縮進(jìn),表明引用


3.<a>


target='_blank'

href='mailto:sldjfd@163.com'

href='#id' 返回到當(dāng)前頁(yè)面指定id的元素位置

href='http://sdfsdf/#id' 返回到sdfsdf頁(yè)面指定id的元素位置



4.<figure>

  <figcaption>


大家在寫xhtml、html中常常用到一種圖片列表,圖片+標(biāo)題或者圖片+標(biāo)題+簡(jiǎn)單描述。以前的常規(guī)寫法:

<li>
<img src="" /><p>title</P>
</li>

而在html5中有了新標(biāo)簽更能語(yǔ)義化的定義出這中圖片列表,那就是figure標(biāo)簽。

w3c賦予的定義:figure標(biāo)簽規(guī)定獨(dú)立的流內(nèi)容(圖像、圖表、照片、代碼等等)。figure 元素的內(nèi)容應(yīng)該與主內(nèi)容相關(guān),但如果被刪除,則不應(yīng)對(duì)文檔流產(chǎn)生影響。

實(shí)例代碼:

<figure>
<p>黃浦江上的的盧浦大橋</p>
<img src="shanghai_lupu_bridge.jpg" width="350" height="234" />
</figure>

figure用來(lái)代替原來(lái)li標(biāo)簽,P標(biāo)簽誰(shuí)來(lái)取代呢?答案就是:figcaption


w3c賦予的定義:figcaption 標(biāo)簽定義 figure 元素的標(biāo)題(caption)。"figcaption" 元素應(yīng)該被置于 "figure" 元素的第一個(gè)或最后一個(gè)子元素的位置。

那么上面的代碼就變成了:

<figure>
<figcaption>黃浦江上的的盧浦大橋</figcaption>
<img src="shanghai_lupu_bridge.jpg" width="350" height="234" />
</figure>



5.<label>


<form>  <label for="male">Male</label>
  <input type="radio" name="sex" id="male" />
  <br />  <label for="female">Female</label>
  <input type="radio" name="sex" id="female" />
</form>

<label> 標(biāo)簽為 input 元素定義標(biāo)注(標(biāo)記)。

label 元素不會(huì)向用戶呈現(xiàn)任何特殊效果。不過(guò),它為鼠標(biāo)用戶改進(jìn)了可用性。如果您在 label 元素內(nèi)點(diǎn)擊文本,就會(huì)觸發(fā)此控件。就是說(shuō),當(dāng)用戶選擇該標(biāo)簽時(shí),瀏覽器就會(huì)自動(dòng)將焦點(diǎn)轉(zhuǎn)到和標(biāo)簽相關(guān)的表單控件上。

<label> 標(biāo)簽的 for 屬性應(yīng)當(dāng)與相關(guān)元素的 id 屬性相同。



6.SWFObject


<form>  <label for="male">Male</label>
  <input type="radio" name="sex" id="male" />
  <br />  <label for="female">Female</label>
  <input type="radio" name="sex" id="female" />
</form>

<label> 標(biāo)簽為 input 元素定義標(biāo)注(標(biāo)記)。

label 元素不會(huì)向用戶呈現(xiàn)任何特殊效果。不過(guò),它為鼠標(biāo)用戶改進(jìn)了可用性。如果您在 label 元素內(nèi)點(diǎn)擊文本,就會(huì)觸發(fā)此控件。就是說(shuō),當(dāng)用戶選擇該標(biāo)簽時(shí),瀏覽器就會(huì)自動(dòng)將焦點(diǎn)轉(zhuǎn)到和標(biāo)簽相關(guān)的表單控件上。

<label> 標(biāo)簽的 for 屬性應(yīng)當(dāng)與相關(guān)元素的 id 屬性相同。




使用

 SWFObject library 

播放flash

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <title>SWFObject - step 3</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="swfobject.js"></script>

    <script type="text/javascript">
        swfobject.registerObject("myId", "9.0.115", "expressInstall.swf");
    </script>

  </head>
  <body>
    <div>

      <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420">

        <param name="movie" value="C:\Users\Administrator\Desktop\1.swf" />
        
            <object type="application/x-shockwave-flash" data="C:\Users\Administrator\Desktop\1.swf" width="780" height="420">
       
                <p>Alternative content</p>
        
             </object>
        
      </object>
    </div>
  </body>
</html>


  • classid (outer object element only, value is always clsid:D27CDB6E-AE6D-11cf-96B8-444553540000)

  • type (inner object element only, value is always application/x-shockwave-flash)

  • data (inner object element only, defines the URL of a SWF)

  • width (both object elements, defines the width of a SWF)

  • height (both object elements, defines the height of a SWF)


  1. The first argument (String, required) specifies the id used in the markup.

  2. The second argument (String, required) specifies the Flash player version your content is published for. It activates the Flash version detection for a SWF to determine whether to show Flash content or force alternative content by doing a DOM manipulation. While Flash version numbers normally consist of major.minor.release.build, SWFObject only looks at the first 3 numbers, so both "WIN 9,0,18,0" (IE) or "Shockwave Flash 9 r18" (all other browsers) will translate to "9.0.18". If you only want to test for a major version you can omit the minor and release numbers, like "9" instead of "9.0.0".

  3. The third argument (String, optional) can be used to activate Adobe express install and specifies the URL of your express install SWF file. Express install displays a standardized Flash plugin download dialog instead of your Flash content when the required plugin version is not available. A default expressInstall.swf file is packaged with the project. It also contains the corresponding expressInstall.fla and AS files (in the SRC directory) to let you create your own custom express install experience. Please note that express install will only fire once (the first time that it is invoked), that it is only supported by Flash Player 6.0.65 or higher on Win or Mac platforms, and that it requires a minimal SWF size of 310x137px.

  4. The fourth argument (JavaScript function, optional) can be used to define a callback function that is called on both success or failure of creating a Flash plug-in <object> on the page (see API documentation)


https://code.google.com/p/swfobject/wiki/documentation



使用

 SWFObject 自動(dòng)加載

播放flash

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
    <title>SWFObject dynamic embed - step 3</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="swfobject.js"></script>
    
    <script type="text/javascript">
    swfobject.embedSWF("1.swf", "myContent", "300", "120", "9.0.0");
    </script>

  </head>
  <body>
    <div id="myContent">
      <p>Alternative content</p>
    </div>
  </body>
</html>


swfobject.embedSWF(swfUrl, id, width, height, version, expressInstallSwfurl, flashvars, params, attributes, callbackFn)has five required and five optional arguments:

  1. swfUrl (String, required) specifies the URL of your SWF

  2. id (String, required) specifies the id of the HTML element (containing your alternative content) you would like to have replaced by your Flash content

  3. width (String, required) specifies the width of your SWF

  4. height (String, required) specifies the height of your SWF

  5. version (String, required) specifies the Flash player version your SWF is published for (format is: "major.minor.release" or "major")








向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI