css应用技巧

【斜角按钮】

效果图
//html
//斜角按钮
信号机
POM4

//css
//斜角按钮
.title_button,.title_button_on{
    position: relative;
    display: inline-block;
    margin: 0 1px;
    padding: 0 15px;
    color: white;
    font-size: 14px;
  } 
  .title_button::before{
    background: #06479e;//默认背景色
    z-index: -1;//避免背景把按钮挡住
    position: absolute;
    content: '';
    top: 0;left: 0;right: 0;bottom: 0;
    transform: skewX(27deg);
  }

  .title_button_on::before,.title_button:hover::before{
    background: #035fdb;//鼠标移过及选中背景色
    z-index: -1;//避免背景把按钮挡住
    position: absolute;
    content: '';
    top: 0;left: 0;right: 0;bottom: 0;
    transform: skewX(27deg);
  }

开始是有效果的,后来发现失效了,所以放弃了伪类的写法,改为下面写法

//html
信号机
INOM

//css
//斜角按钮
.title_button,.title_button_on{
    position: relative;
    display: inline-block;
    margin: 0 1px;
    padding: 0 15px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    height: 23px;
  } 
  .title_button a,.title_button_on a{
    z-index: 2;
    position: relative;
  } 
  .title_button b{
    width:100%;
    display: block;
    background: #06479e;
    z-index: 1;
    position: absolute;
    top: 0;left: 0;right: 0;bottom: 0;
    transform: skewX(27deg);
  } 
  .title_button_on b,.title_button:hover b{
    background: #035fdb;
    z-index: 1;
    position: absolute;
    top: 0;left: 0;right: 0;bottom: 0;
    transform: skewX(27deg);
  }

【常用表格样式】

image.png
控制组 最大采样 最大缓存空间 所控通道
组1 4444 5676575 89098

表格样式

.mytable
        {
            border-radius: 20px;
            width: 100%;
            border-collapse: collapse;
            margin: 0 auto;
            text-align: center;
        }
        .mytable td, .mytable th
        {
            border: 1px solid #5f6f9c;
            color: #fff;
            padding: 10px;
        }
        
        .mytable th
        {
            background-color: #4a5986;
            color: #93a2cd;
        }
        .mytable tr:nth-child(odd)
        {
            background: #445177;
        }
        .mytable tr:nth-child(even)
        {
            background: #445177;
            
        }

你可能感兴趣的:(css应用技巧)