html网页部分css样式设置笔记

  • 背景图片网页全屏自适应(注意图片路径是否正确)
/*
* “ ./ ”:代表目前所在的目录。
* “ ../ ”:代表上一层目录。
* ” / ”开头:代表根目录。
*/
body {
	font-family: "Oracle Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif !important;
	background-image: url("../img/oraclebg.jpg");
	background-position: center 0;
	background-repeat: no-repeat;
	background-attachment: fixed;
	background-size: cover;
	-webkit-background-size: cover;
	-o-background-size: cover;
	-moz-background-size: cover;
	-ms-background-size: cover;
}
  • 网页题目字体样式设置
.title {
	cursor: auto;
	text-align: center !important;
	font-size: 35px;
	color: #333 !important;
	font-weight: normal !important;
	margin: 0 auto;
	display: block;
}
  • 设置div块在网页中居中(用来写主要网页内容)
#square {
	-webkit-font-smoothing: antialiased;	
	font-weight: normal;
	font-size: 11px;
	color: #333333;
	line-height: 1.3;
	cursor: auto;
	border: none;
	box-shadow: none;
	min-width: 320px;
	max-width: 870px;
	padding: 50px !important;
	text-align: center !important;
	background: #FCFBFA !important;
	border-radius: 8px;
	margin: 70px 260px  !important;
	width: 100%;
	box-sizing: border-box;
}
  • 表单标签字体样式
#label {
	color: #4F4F4F;
	font-weight: normal;
	font-size: 15px;
	word-wrap: break-word;
	text-align: right;
	white-space: normal !important;
}
  • 输入文本框变成横线
#i1 {
	-webkit-font-smoothing: antialiased;
	font-weight: normal;
	cursor: auto;
	border-style: solid;
	border:none; //去边框
	border-radius: 0px !important; //去圆角
    box-shadow: 0px 0px 0px 0px; //去阴影
	box-sizing: border-box;
	color: #333333; //字体色
	margin: 1px;
	overflow-x: hidden;
	overflow-y: auto;	
	border-bottom: #CBC5BF 2px solid ;
	background: transparent;
	margin-right: .3em;
	padding: 8px 30px 8px 10px !important;
	font-size: 15px!important;
	float: left;
	width: 324px;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值