導航:首頁 > 萬維百科 > 網頁設計頁面背景色怎麼做

網頁設計頁面背景色怎麼做

發布時間:2020-11-16 12:36:04

1、製作網頁如何改變背景顏色

<head>
<title></title>
<style type="text/css">
body{background-color:#000;}
</style>
</head>
這是整體改變背景顏色,單獨改某個區域的話,用bgcolor這個

2、網頁製作中使整個網頁背景為一個顏色或一張圖片的代碼怎麼寫?

設置背景色<body style="background:#CC9999">
</body>

設置背景圖片<body style="background-image:url(圖片地址)">
</body>

3、網頁設計表格背景顏色

可以用background

body
  { 
  background: #00FF00 url(bgimage.gif) no-repeat fixed top;
  }

定義和用法

background 簡寫屬性在一個聲明中設置所有的背景屬性。

4、怎麼設計css網頁背景顏色過渡?

CSS實現漸變背景效果兼容主流瀏覽器
IE瀏覽器下漸變背景的使用需要使用IE的漸變濾鏡filter
對於Firefox瀏覽器下(Firefox 3.6+)漸變背景的實現需使用CSS3漸變屬性 為-moz-linear-gradient屬性
對於webkit核心的瀏覽器,如Chrome/Safari瀏覽器下漸變背景的實現也是使用CSS3 漸變方法為-webkit-gradient
代碼如下:
.gradient{
width:300px;
height:150px;
filter:alpha(opacity=100 finishopacity=50 style=1 startx=0,starty=0,finishx=0,finishy=150) progid:DXImageTransform.Microsoft.gradient(startcolorstr=red,endcolorstr=blue,gradientType=0);/*IE*/
-ms-filter:alpha(opacity=100 finishopacity=50 style=1 startx=0,starty=0,finishx=0,finishy=150) progid:DXImageTransform.Microsoft.gradient(startcolorstr=red,endcolorstr=blue,gradientType=0);/*IE8*/
background:red; /* 一些不支持背景漸變的瀏覽器 */
background:-moz-linear-gradient(top, red, rgba(0, 0, 255, 0.5)); /*Firefox*/
background:-webkit-gradient(linear, 0 0, 0 bottom, from(#ff0000), to(rgba(0, 0, 255, 0.5))); /*Chrome/Safari*/
}
<div class="gradient"></div>

5、如何設置網頁背景顏色

第一步, 在桌面上點擊滑鼠右鍵,依次點擊「屬性」、「外觀」、「高級」按鈕。

第二步, 在打開的「高級」對話框中,在「項目」下拉列表裡選擇「窗口」。

第三步, 再打開右邊對應的「顏色」列表,選擇其中的「其他」一項,在打開的對話框里,把「色調」的參數設置為85,把「飽和度」參數設置為90,把「亮度」參數設置為205。再點擊「確定」退出設置。

第四步,打開ie瀏覽器,選擇「工具」欄中的「internet選項」,點擊「輔助功能」按鈕,在「不使用網頁中指定的顏色」前打鉤。
全部步驟完成後,網頁、文件夾、文本文檔里的背景顏色都變成了綠色。其中,色調、飽和度和亮度的參數值,還可以根據個人的喜好稍作修改,讓自己用電腦的候最舒服。

6、html 網頁製作 如何設置網頁背景色

首先打開電腦上自帶的記事本程序,然後輸入html網頁基本結構語句。<html><body></body></html>

由於css樣式必須在標簽<head></head>之間,因此我們點擊<html>後面,輸入<head></head>標簽。

在head標簽之間輸入樣式標簽<style></style>,然後定義一些屬性,例如

<style type="text/css">

body {background-color: yellow} 定義網頁背景色為黃色;

h1 {background-color: #00ff00} 定義h1標簽背景色為#00ff00;

h2 {background-color: transparent} 定義h2標簽背景色為透明;

p {background-color: rgb(250,0,255)} 定義p標簽背景色為rgb值;

p.no2 {background-color: gray; padding: 20px;} 這個定義class屬性為no2的p標簽背景色為灰色,並且邊距為20px;

</style>

然後點擊body標簽後面輸入正文標簽內容,例如

<h1>這是KING</h1>

<h2>這是KING</h2>

<p>這是KING</p>

<p class="no2">這個KING設置20內邊距。</p>

點擊記事本菜單中的文件,選擇另存為,把內容保存為html網頁格式。雙擊打開預覽效果。

我們可以發現代碼中兩個同樣的<p>標簽顯示的css樣式卻不同,區別就在於樣式中定義的p.no2,這就是正文代碼中class="no2"的優勢所在,可以定義個性風格。

7、網頁設計中,怎麼用CSS做出磨砂的背景效果?

代碼:透明背景(帶磨砂玻璃效果)註:在粘貼到空白模板前一定先打個空格。

<STYLE type=text/css>

.bodytop{background:#transparent}

.banner{ background:#transparent}

.menu{ background:#transparent}

.bodyBg {background:#transparent;filter:progid:DXImageTransform.Microsoft.gradient(GradientType ='1',enabled='true',startColorstr=#AAFFFFFF, endColorstr=#AAFFFFFF);}

.zone{ background:#transparent}

.bodyBottom{background:#transparent}

.feeds .up{background:#transparent}

.feeds .down{background:#transparent }

.feeds .function{background:#transparent}

.feeds .page{background:#transparent}

.aList .sysHand .up{background:#transparent}

.aList .sysHand .down{background:#transparent}

.gbook .sysHand .up{background:#transparent}

.gbook .sysHand .down{background:#transparent}

.gbook .title{display:none;}

.logo{display:none;}

.gbook .page{background:#transparent }

.gbook .login{background:#transparent}

.box_1{background:#transparent}

.box_2{background:#transparent}

.calendar{background:#transparent}

.calendar .mid{background:#transparent}

.calendar .top{background:#transparent}

.calendar .title{background:#transparent}

.calendar .bold td{background:#transparent}

.calendar .bottom{background:#transparent}

.callboard .mid{background:#transparent}

.callboard .mid img{background:#transparent}

.callboard .front{background:#transparent}

.callboard .back{background:#transparent}

.callboard table{background:#transparent}

.callboard .up{background:#transparent}

.callboard .down{background:#transparent }

.sysBr{background:#transparent}

.sysBr210{background:#transparent}

.label{background:#transparent}

.label .mid{background:#transparent}

.label .top{background:#transparent}

.label .bottom{background:#transparent}

.photo{background:#transparent}

.photo .mid{background:#transparent}

.photo .image{background:#transparent}

.photo .top{background:#transparent}

.photo .bottom{background:#transparent}

.links{background:#transparent}

.links .up{background:#transparent}

.links .down{background:#transparent }

.links .mid{background:#transparent}

body{background:url("
http://s11.sinaimg.cn/orignal/439175a380fda7635072a
") repeat fixed!important;}

.add{background:#transparent}

.add .ico{background:#transparent}

</STYLE>

8、製作網頁如何改變背景顏色?

打開Adobe Dreamweaver,新建一個HTML網頁文件.

網頁的一般結構,首先是DOCTYPE聲明,然後是頭部標簽<head>...</head>,文檔的主體<body>..</body>標簽,我們需要設置網頁背景,直接設置<body>標簽的背景就行了。

點擊右邊的所有規則,新建一條規則,在彈出的界面,選擇器類型為標簽選擇器,選擇器名稱為body,然後點擊確認。

在CSS規則裡面選擇背景,在「background-color」裡面選擇一種顏色作為網頁背景色,然後點擊確認。

然後點擊在瀏覽器調試,查看網頁背景,詳細代碼如下:

<!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>無標題文檔</title>

<style type="text/css">

body {

background-color: #FC6;

}

</style>

</head>

<body>

</body>

</html>

網頁不僅僅可以用顏色作為背景,還可以用圖片作為網頁背景,打開剛才新建的規則,繼續選擇背景,「background-image」選項後面有瀏覽按鈕,將作為背景的圖片選擇好,然後點擊確認。

然後在調試網頁,查看網頁的背景,圖片已經作為網頁的背景顏色了。代碼如下:

<!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>無標題文檔</title>

<style type="text/css">

body {

background-image: url(10/38.png);

}

</style>

</head>

<body>

</body>

</html>

9、Dreamweaver製作網頁中設置頁面的大小及頁面背景色

1、直接打開Dreamweaver軟體。

2、點擊下面屬性面板中的頁面屬性。

3、彈出對話框後可以自定義背景色,也可以添加背景圖片,根據需要製作的寬度來定義其他表單即可。

與網頁設計頁面背景色怎麼做相關的知識