Java项目实训_2020/12/28

2020/12/28
一、今日所学内容
1.HTML基本格式
	<!DOCTYPE html>     
//加了此标签代表H5,否则H4
<html>
    <head> </head>
    <body> </body>
	<p> </p>       显示标签
</html>
 
属性:
	作用:提供了HTML的更多信息。

2.CSS
	2.1添加方式
		1.内联样式- 在HTML元素中使用"style" 属性
		2.选择器 {}:内部样式表 -在HTML文档头部 <head> 区域使用<style> 元素 来包含CSS
		3.外部引用 - 使用外部 CSS 文件
		优先级依次降低
	2.2选择器
		1.选择器 {属性名:属性值,属性名;属性值...} 
			.1.1 class="classP"    (name)
				表示:.classP{width: 200px; height: 100px; background-color: chartreuse;}
			.1.2 id="calssID"   
				用# 表示:#classP{width: 200px; height: 100px; background-color: chartreuse;}
			.1.3 标签选择器 
				p{width: 200px; height: 100px; background-color: chartreuse;}
		2.颜色
			.1.1十六进制 #
			.1.2rgb/rgba
			.2.1背景色
				background-color
			.2.2背景图
				background-image: url('000000.jpg');
			.2.3背景是否平铺
				background-repeat : no-repeat
			.2.4是否固定或者随页面滚动
				background-attachement :fixed
			.2.4设置背景图的其实位置
				background-position:right top
		3.像素
			.1 px 最小的像素单元
			.2 wh 可视范围内设置为100%
			.3 vh 1vh等于视口高度的1%
		4.position
			position 属性的五个值:
			static 默认
			relative 参照物,相对定位
			fixed 相对于浏览器窗口是固定位置
			absolute 相对于最近的已定位父元素,如果元素没有已定位的父元素,那么它的位置相对于<html>
			sticky	基于用户的滚动位置来定位
			
posted @ 2022-11-21 18:54  TwcatL_tree  阅读(1)  评论(0编辑  收藏  举报