自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

騰訊校園招聘前端實(shí)習(xí)生面試題及答案

開發(fā) 前端
本文是騰訊校園招聘前端實(shí)習(xí)生面試題及答案,校園招聘題目難度略顯簡單,所以一些有工作經(jīng)驗(yàn)的就不要再提出這一問題了,面試題分為選擇、填空、判斷、簡答題和代碼題。

一、   耐心填一填?。靠?分,共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. <h1>文章標(biāo)題</h1>

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″      B. padding:0        C. margin:0     D.  cellspacing=”0″

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

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

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

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

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

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

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

#p#

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

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

答:

  1. <ul> 
  2.          <li> </li> 
  3.    </ul> 
  4.    <ol> 
  5.          <li> </li> 
  6.    </ol> 
  7.    <dl> 
  8.         <dt> </dt> 
  9.         <dd> </dd> 
  10.    </dl> 

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

a) 代碼一:

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

b) 代碼二:

  1. background-position:0 0;  
  2. background-repeat:no-repeat;  
  3. background-attachment:fixed;  
  4. background-color:#f00;  
  5. background-image:url(background.gif);  

c)代碼三:

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

d) 代碼四:

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

e)代碼五:

  1. margin-left:20px;  
  2. margin-right:20px;  
  3. margin-bottom:5px;  
  4. margin-top:20px

f)代碼六

  1. color:#336699;  
  2. 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> <h2>Don’t buy these electronics used</h2> 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>  <h2>Don’t buy these electronics used</h2>  <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.

#p#

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

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

十字架

要求:

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

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

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

答案:

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

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
  2. <html xmlns="http://www.w3.org/1999/xhtml"> 
  3. <head> 
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
  5. <title>2個(gè)DIV</title> 
  6. <style type="text/css"> 
  7. #heng,#shu{left:50%;top:50%;position:absolute; background-color:#f00;}  
  8. #shu{width:50px;height:150px;margin-left:-25px;margin-top:-75px;}  
  9. #heng{width:150px;height:50px;margin-left:-75px;margin-top:-25px;background-color:#f00;}  
  10. </style> 
  11. </head> 
  12. <body> 
  13.      <div id="heng"></div> 
  14.      <div id="shu"></div> 
  15. </body> 
  16. </html> 

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

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
  2. <html xmlns="http://www.w3.org/1999/xhtml"> 
  3. <head> 
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
  5. <style type="text/css"> 
  6. .main{width:150px; height:150px; top:50%; left:50%; position:absolute; margin:-75px 0 0 -75px; border:2px #F00 solid;}  
  7. .heng{width:150px; height:50px; background:#F00; margin-top:50px;}  
  8. .shu{width:50px; height:150px; background:#F00; margin-left:50px; margin-top:-100px;/*margin上邊界疊加*/}  
  9. </style> 
  10. <title>3個(gè)DIV</title> 
  11. </head> 
  12. <body> 
  13.   <div class="main"> 
  14.          <div class="heng"></div> 
  15.          <div class="shu"></div> 
  16. </div> 
  17. </body> 
  18. </html> 

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

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
  2. <html xmlns="http://www.w3.org/1999/xhtml"> 
  3. <head> 
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
  5. <title>5個(gè)DIV(www.hemin.cn)</title> 
  6. <style type="text/css"> 
  7. #top,#middle,#left,#right,#bottom{height:50px;width:50px;position:absolute;top:50%;left:50%;}  
  8. #top{margin:-75px 0 0 -25px;background:#F00;}  
  9. #middle{margin:-25px 0 0 -25px;background:#000;}  
  10. #left{margin:-25px 0 0 -75px;background:#00F;}  
  11. #right{margin:-25px 0 0 25px;background:#0F0;}  
  12. #bottom{margin:25px 0 0 -25px;background:#FF0;}  
  13. </style> 
  14. </head> 
  15. <body> 
  16. <div id="top"></div> 
  17. <div id="middle"></div> 
  18. <div id="left"></div> 
  19. <div id="right"></div> 
  20. <div id="bottom"></div> 
  21. </body> 
  22. </html> 

 【編輯推薦】

 

責(zé)任編輯:張偉 來源: 程序員之家
相關(guān)推薦

2021-10-27 11:00:30

C++語言面試

2015-04-14 15:05:35

Web前端開發(fā)騰訊暑期實(shí)習(xí)生

2022-01-18 08:16:52

Web 前端JavaScript

2009-02-16 13:03:43

華為面試

2009-06-16 13:41:19

Hibernate面試Hibernate面試

2019-05-15 16:45:13

SpringBoot面試題Java

2022-07-27 08:27:34

Call前端

2020-11-12 10:20:40

前端面試web

2012-06-28 14:35:49

Web

2015-07-23 14:13:43

前端開發(fā)面試題

2010-10-12 11:06:07

招聘

2015-04-22 12:19:42

JAVAJAVA面試題答案解析

2017-09-25 10:00:18

Hadoop面試題答案解析

2023-08-27 15:57:28

前端開發(fā)

2024-02-26 15:35:44

2018-02-25 16:35:32

前端CSS面試題

2016-05-05 17:45:43

Spring面試題答案

2009-09-25 09:30:12

騰訊校園招聘

2011-05-19 16:30:38

軟件測試

2019-03-28 13:50:47

大數(shù)據(jù)面試Hadoop
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)