html与css

css 可以将html组件绘制出不同的效果,内容方面还需要html来补充。

边框的构建:<div style = "border: red dotted 1px ; height:200px">

hello world </div>

应注意语法格式,其中red表示边框的颜色,dotted表示边框为点状,1像素

注册框的修饰只有底边的输入框:

学生姓名:<input type = "text" style = "border:none;border_bottom:#00FFFF 1px solid"

通过标签style,一般有几中选择器

1:标签选择器:tagname{}

<style type = "text/css">
    div{

   属性
}

</style>

2:类选择器:.divClass{}在标签上使用class引用样式

单独的调整某个div的属性用.divClass{}   然后在<div>中用class="divClass"引用自改。这是一种样式的覆盖并不是重叠

.divClass{
    属性
}

<div class="divClass"> 内容</div>

若想要所有的项目都能引用css样式则需要创建一个css文件 比如first.css:3:

引用方式

<link rel="stylesheet" href = "css/first.css" type = "text/css">

其中rel表示链接文件,类型   href表示文件所在位置

3:复合引用样式 div span{ font-family:}改变div标签下的sapn标签下的字体

猜你喜欢

转载自blog.csdn.net/maybeno1314/article/details/79567534