css 常用属性

inherit:继承
-------边框---------
border-style: dotted;
border-color: black;
border-width: thin;

dotted:点
solid:实线
dashed:虚线
groove:凹
ridge:凸
------文字居中-------
text-align: center;
-----文字大小-------
font-size: larger;
-----文字字体-------
font-family: "楷体";
-----文字下划线-------
text-decoration: underline;
------布局居中-------
margin: auto;
---------相对于与浏览器绝对定位-----------
position: fixed;
bottom: 0;
right: 0;

relative:相对于原来的位置(对象不可层叠)
absolute:对象可重叠
-------absolute示例----------
//设置被其他元素覆盖
position: absolute;
top: 0;
left: 0;
color: #FF0000;
z-index: -1;

//设置其他元素的透明度
$("div").each(function() {
    $(this).css("opacity",arguments[0]/5)
})
----------块级---------------
float
clear
------------滑动条--------------
overflow-y: scroll;
-----------鼠标样式------------
cursor: pointer;
----------滑动条样式-----------
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
    background-color: black;
}
::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    background-color: #F5F5F5;
}
::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
    background-color: #555;
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值