当前位置:科普知识站>综合知识>

html的样式怎么写

综合知识 阅读(1.91W)
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>