綜合知識

當前位置 /首頁/綜合知識 > /列表

html的樣式怎麼寫

1. HTML css 樣式 下面的樣式如何寫

<ul>

html的樣式怎麼寫

<li><img src=""/><a href="#">;文字文字文字<span>;焦點圖</span><span>2014-6-19</span></a></li>

<li><img src=""/><a href="#">;文字文字文字<span>;焦點圖</span><span>2014-6-19</span></a></li>

<li><img src=""/><a href="#">;文字文字文字<span>;焦點圖</span><span>2014-6-19</span></a></li>

</ul>

ul,li{margin:0;padding:0;}

ul{width:200px;}

li{display:block;float:left;height:80px;border-bottom:1px solid #999;padding:10px 0;}

img{border:0;float:left;width:80px;height:80px;margin-right:5px;}

a{display:inline-block;}

span{display:block;color:#ccc;}

2. html這樣的樣式應該怎麼寫

border-bottom:1px solid #333p{text-align; display:inline-block; margin;<}span{height:30px:#000;}<:14px; color;width:600px;主要是span的高度要比p的高;span>:#fff; font-size; line-height:30px:50px auto;/p> padding:0 10px; background;p>相關票據3. 如何在html 標籤中直接寫樣式

更改HTML標籤中的行內樣式,首先需要確認的是要修改標籤的所在位置,然後想好所要改的css樣式,在行級中的style標籤後面去書寫就可以了,具體看下代碼:

<html>

<head>

</head>

<body>

<div id="round" style="width:400px;">; //通過行級樣式來編寫這個div的width和height

<p>;我是測試文字</p>

</div>

</body>

</html>

4. 如圖中的html+css樣式應該怎麼寫

<html>

<head>

<meta charset=utf-8">

<style type="text/css">

.tab{

width: 520px;

height: 25px;

background-color: darkorange;

color: white;

font-family: simhei;

}

td{

width: 50px;

}

</style>

</head>

<body>

<table class="tab" >

<tr>

<td rowspan=3></td>

<td></td>

<td>;首頁</td>

<td>;尋找</td>

<td>

<select style="background-color: darkorange;color: #ffffff;">

<option>;場地</option>

<option>;沙灘</option>

<option>;小樹林</option>

<option>;別墅裏</option>

</select>

</td>

<td>;發佈</td>

<td>;需求</td>

</tr>

</table>

</body>

</html>

代碼運行圖:

如有問題,我們繼續交流。

希望能夠幫助到你,望採納!

5. CSS樣式都有哪幾種

大小 font-size: x-large;(特大) xx-small;(極小) 一般中文用不到,只要用數值就可以,單位:PX、PD、em等

樣式 font-style: oblique;(偏斜體) italic;(斜體) normal;(正常)

行高 line-height: normal;(正常) 單位:PX、PD、EM

粗細 font-weight: bold;(粗體) lighter;(細體) normal;(正常)

色彩background-color: #FFFFFF;

圖片background-image: url();border-style: dotted;(點線) dashed;(虛線) solid;(實線) double;(雙線) groove;(凹槽) ridge;(脊狀) inset;(邊框) outset;(邊框)

類型list-style-type: disc;(圓點) circle;(圓圈) square;(方塊) decimal;(數字) none(無)text-align:right; /*文字右對齊*/

text-align:left; /*文字左對齊*/

text-align:center; /*文字居中對齊*/

text-align:justify; /*文字分散對齊*/

vertical-align屬性

vertical-align:top; /*垂直向上對齊*/

vertical-align:bottom; /*垂直向下對齊*/

vertical-align:middle; /*垂直居中對齊*/

vertical-align:text-top; /*文字垂直向上對齊*/

vertical-align:text-bottom; /*文字垂直向下對齊*/這些都是比較常用的如果你要把樣式做的很漂亮這些還是不夠的自己去看看文檔吧慢慢學習

6. css樣式 怎麼寫

手寫了一個例子:

<html>

<head>

<style type="text/css">

.fl {float:left;}

.top .fl {width:28%; text-align:left;background-color:red;}

</style>

</head>

<body>

<div class="top">

<span class="fl">fl</span>

</div>

<br />

<span class="fl">fl</span>

</body>

</html>

效果如圖,第一個span是包含在div裏的(div 的class為top),為了能看清楚,加了紅色的背景。可以看出,紅色部分正好是頁面寬度的28%(371px/1366px約等於28%)。而第二個,沒有包含在div裏的span,沒有紅色背景,顯然是不受.top .fl {width:28%; text-align:left;background-color:red;}影響。。。當然咯,你自己測試的時候可以加上.top{***********},體會體會。。。不懂的話,追問咯 ^_^

7. 什麼是樣式

你好,看這個簡單的html代碼,你就明白了,樣式就是表示“外觀”,而html樣式就是“使html頁面顯示達到一定效果”的輔助代碼或文件。

比如這段代碼裏,<style>。</style>;中間的內容就是html樣式,它是為了實現使當前頁面中id值為myLink的元素,在鼠標移動到上面時顯示黃色背景,而鼠標離開時顯示白色背景,就是這樣。

<html>

<head><title>;主頁</title>

<style>

#myLink:hover{background:yellow;}

#myLink:out{background:white;}

</style>

</head>

<body>

<a id="myLink" href="hi.baidu.com/lylegend13">;我的百度空間</a>

</body>

TAG標籤:html #