溫馨提示×

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

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

web前端實(shí)習(xí)生面試題有哪些

發(fā)布時(shí)間:2021-11-18 11:58:35 來源:億速云 閱讀:563 作者:iii 欄目:web開發(fā)

這篇文章主要介紹“web前端實(shí)習(xí)生面試題有哪些”,在日常操作中,相信很多人在web前端實(shí)習(xí)生面試題有哪些問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對(duì)大家解答”web前端實(shí)習(xí)生面試題有哪些”的疑惑有所幫助!接下來,請(qǐng)跟著小編一起來學(xué)習(xí)吧!

一、   耐心填一填?。靠?分,共24分)

1. 為div設(shè)置類a與b,應(yīng)編寫HTML代碼 _<div class=”a b”>_</div>_________。

2. 設(shè)置CSS屬性clear的值為 _both___________時(shí)可清除左右兩邊浮動(dòng)。

3.   ____li________標(biāo)簽必須直接嵌套于ul、ol中。

4. CSS屬性 _____margin_______可為元素設(shè)置外補(bǔ)丁。

5. 設(shè)置CSS屬性float的值為 ___none_________時(shí)可取消元素的浮動(dòng)。

6. 文字居中的CSS代碼是 ____text-align:center________。

二、   精心選一選?。款}4分,共16分)

1. 下列哪個(gè)樣式定義后,內(nèi)聯(lián)(非塊狀)元素可以定義寬度和高度( C  )

A. display:inline      B. display:none     C. display:block    D. display:inheric

2. 選出你認(rèn)為最合理的定義標(biāo)題的方法( C    )

A. <span class=”heading”>文章標(biāo)題</span>

B. <p><b>文章標(biāo)題</b></p>

C. <h2>文章標(biāo)題</h2>

D. <strong>文章標(biāo)題</strong>

3. br標(biāo)簽在XHTML中語義為( A    )

A.換行          B.強(qiáng)調(diào)          C.段落          D.標(biāo)題

4. 不換行必須設(shè)置(  AC  )

A.word-break        B.letter-spacing        C.white-space       D.word-spacing

5. 在使用table表現(xiàn)數(shù)據(jù)時(shí),有時(shí)候表現(xiàn)出來的會(huì)比自己實(shí)際設(shè)置的寬度要寬,為此需要設(shè)置下面哪些屬性值(  AD   )

A. cellpadding=”0&Prime;      B. padding:0        C. margin:0     D.  cellspacing=”0&Prime;

三、判斷對(duì)或錯(cuò)! (每題4分,共24分)

1. CSS屬性font-style 用于設(shè)置字體的粗細(xì)。                             (  &times;   )

2. CSS屬性overflow用于設(shè)置元素超過寬度時(shí)是否隱藏或顯示滾動(dòng)條。     (   &radic;  )

3. 在不涉及樣式情況下,頁面元素的優(yōu)先顯示與結(jié)構(gòu)擺放順序無關(guān)。            (   &times;  )

4. 在不涉及樣式情況下,頁面元素的優(yōu)先顯示與標(biāo)簽選用無關(guān)。                 (   &radic;  )

5. display:inline兼容所有的瀏覽器。                              (  &radic;   )

6. input屬于窗體元素,層級(jí)顯示比flash、其它元素都高。              (   &times;  )

四、用心想一想,你一定是生活中的智者! (每題9分,共36分)

1. 寫出ul、ol、dl三種列表的html結(jié)構(gòu)。

答:

<ul>          <li> </li>    </ul>    <ol>          <li> </li>    </ol>    <dl>         <dt> </dt>         <dd> </dd>    </dl>

2. 將以下CSS代碼進(jìn)行縮寫,注意要符合縮寫的規(guī)范。

a) 代碼一:

border-width:1px;  border-color:#000;  border-style:solid;

b) 代碼二:

background-position:0 0;  background-repeat:no-repeat;  background-attachment:fixed;  background-color:#f00;  background-image:url(background.gif);

c)代碼三:

font-style:italic;  font-family:"Lucida Grande",sans-serif;  font-size:1em;  font-weight:bold;  font-variant:small-caps;  line-height:140%;

d) 代碼四:

list-style-position:inside;  list-style-type:square;  list-style-image:url(image.gif);

e)代碼五:

margin-left:20px;  margin-right:20px;  margin-bottom:5px;  margin-top:20px;

f)代碼六

color:#336699;  color:#ffcc00;

答:

代碼一:border:1px #000 solid;

代碼二:background: #f00 url(background.gif) no-repeat fixed 0 0;

代碼三:font:italic bold small-caps 1em/140% "lucida Grande",sans-serif;

代碼四:list-style: url(image.gif) square inside;

代碼五:margin:20px 20px 5px 20px;

代碼六:color:#369;color:#fc0;

3. 修改以下代碼,使其結(jié)構(gòu)更加合理以及符合W3C標(biāo)準(zhǔn)。(XHTML 1.0 Strict)

代碼:

<div> <h3>Don&rsquo;t buy these electronics used</h3> Money may be tight, but you may kick yourself for purchasing these electronics secondhand. <br /> Even when the price is low, the risk may be too high. <br /> <p><img src=”album.jpg”></p> <p> <a href=”home.html” target=”_blank”>home</a> <a href=”content.html” target=”_blank”>content</a> </p> </div>

答:

<div>  <h3>Don&rsquo;t buy these electronics used</h3>  <p> Money may be tight, but you may kick yourself for purchasing these electronics secondhand. </p>  <p>Even when the price is low, the risk may be too high.</p>  <img src="album.jpg" alt="album" />  <ul>    <li><a href="home.html" rel="external" title="home">home</a></li>    <li><a href="content.html" rel="external" title="content">content</a></li>  </ul></div>

4. 簡述border:none以及border:0的區(qū)別,并給出使用建議。

答:border:none表示邊框樣式無,border:0表示邊框?qū)挾葹?;當(dāng)定義了border:none,即隱藏了邊框的顯示,實(shí)際就是邊框?qū)挾葹?.
當(dāng)定義邊框時(shí),必須定義邊框的顯示樣式.因?yàn)檫吙蚰J(rèn)樣式為不顯示none,所以僅設(shè)置邊框?qū)挾?由于樣式不存在,邊框的寬度也自動(dòng)被設(shè)置為0.

五、勇氣拼一拼,讓你超越別人的加分題目來了! (不限于一種方法,共30分)

使用重構(gòu)的方式制作出一個(gè)如下圖的水平、垂直都居中短邊為50px,長邊為150px的紅色十字架。

web前端實(shí)習(xí)生面試題有哪些

十字架

要求:

1.使用2個(gè)div完成

2.使用3個(gè)div完成

3.使用5個(gè)div完成

答案:

1.使用2個(gè)div完成

<!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>2個(gè)DIV</title> <style type="text/css"> #heng,#shu{left:50%;top:50%;position:absolute; background-color:#f00;}  #shu{width:50px;height:150px;margin-left:-25px;margin-top:-75px;}  #heng{width:150px;height:50px;margin-left:-75px;margin-top:-25px;background-color:#f00;}  </style> </head> <body>      <div id="heng"></div>      <div id="shu"></div> </body> </html>

2.使用3個(gè)div完成

<!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" /> <style type="text/css"> .main{width:150px; height:150px; top:50%; left:50%; position:absolute; margin:-75px 0 0 -75px; border:2px #F00 solid;}  .heng{width:150px; height:50px; background:#F00; margin-top:50px;}  .shu{width:50px; height:150px; background:#F00; margin-left:50px; margin-top:-100px;/*margin上邊界疊加*/}  </style> <title>3個(gè)DIV</title> </head> <body>   <div class="main">          <div class="heng"></div>          <div class="shu"></div> </div> </body> </html>

3.使用5個(gè)div完成

<!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>5個(gè)DIV(www.hemin.cn)</title> <style type="text/css"> #top,#middle,#left,#right,#bottom{height:50px;width:50px;position:absolute;top:50%;left:50%;}  #top{margin:-75px 0 0 -25px;background:#F00;}  #middle{margin:-25px 0 0 -25px;background:#000;}  #left{margin:-25px 0 0 -75px;background:#00F;}  #right{margin:-25px 0 0 25px;background:#0F0;}  #bottom{margin:25px 0 0 -25px;background:#FF0;}  </style> </head> <body> <div id="top"></div> <div id="middle"></div> <div id="left"></div> <div id="right"></div> <div id="bottom"></div> </body> </html>

到此,關(guān)于“web前端實(shí)習(xí)生面試題有哪些”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注億速云網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!

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

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

web
AI