QLabl样式表

QLabel

{

//设置字体样式

font-family: "Microsoft YaHei";//字体类型

font-size: 25px;//字体大小,像素

font-style: italic;//字体斜体样式,mormal不斜体

font-weight:bold;//字体加粗样式,mormal不加粗

color: #bdc8e2//字体颜色

 

font: bold italic 18px "Microsoft YaHei";//顺序要求:style weight size family 或者 weight style  size family

 

//文字位置

padding-left: 10px;距离左边边界的距离

padding-top: 10px;距离顶边边界的距离

padding-right: 10px;距离右边边界的距离

padding-bottom: 10px;距离底边边界的距离

//边框样式

border-style: solid;//边框样式,实线:solid ;虚线:dashed; 点线:dotted;

不显示(默认):none;

border-width: 2px;

border-color: red;

border:2px,solid red;//同时设置

//某一条边框(其他三个边框: right,bottom,left)

border-top-style:solid;

border-top-width:2px;

border-top-color:red;

//圆角

border-top-left-radius:20px;//左上角弧度

border-top-right-radius:20px;//右上角弧度

border-bottom-left-radius:20px;//左下角弧度

border-bottom-right-radius:20px;//右下角弧度

 

bordet-radius:20px;//同时设置4个角的弧度

 

//背景样式

background-color:rgba(r,g,b,a);//值transparent为透明

background-image:url(".png");//背景图片

background-repeat:no-repeat;//在x轴重复:repeat-x; 在y轴重复:repeat-y

background-position:left center;//图片显示位置:left,right,center,top,bottom;

 

background: url(".png") no-repeat left center #2e3648;//顺序任意

}

//动态样式(不存在pressed样式)

//鼠标悬浮

QLabel:hover{

color:

}

//标签禁止

QLabel:disabled{

color:

}

  • 2
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值