zoukankan      html  css  js  c++  java
  • CSS0021: css 根据字体的大小 ,自动适应div等其他元素的大小

    1,

            /*手机*/
            @media screen and (max-600px) {
    
                /* 设置字体大小 ,其余元素按字体自动调整大小*/
                body {
                    font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
                    font-size: 15px;
                    color: #000;
                }
    
                ul {
                    list-style: none;
                }
    
                .nice-select input {
                    position: absolute;
                    outline: none;
                    cursor: pointer;
                    width: 13em;
                    height: 1.8em;
                    font-size: 1em;
                    /* 设置内边距 */
                    box-sizing: border-box;
                    padding: 0 0 0 0.6em;
                    border: 2px solid red;
                    background: url('../img/icon.png') no-repeat scroll right center transparent;
                    background-size: 6% 80%;
                    background-position: 96% 50%;
                    -webkit-border-radius: .3em;
                    -moz-border-radius: .3em;
                    border-radius: .3em;
                }
    
                .nice-select {
                    position: absolute;
                    z-index: 2;
                    width: 13em;
                    top: 1em;
                    left: 50%;
                    transform: translate(-50%, 0);
                }
    
                .nice-select ul {
                    position: absolute;
                    z-index: 10001;
                    display: none;
                    width: 13em;
                    top: 1.8em;
                    max-height: 360px;
                    overflow: hidden;
                    overflow-y: auto;
                    box-sizing: border-box;
                    border: 1px solid #d5d5d5;
                    background-color: rgba(240, 237, 241, 0.9);
                }
    
                .nice-select ul li {
                    overflow: hidden;
                    padding: 0.2em 0 0.2em 0.6em;
                    cursor: pointer;
                    border-top: 1px solid #d5d5d5;
                }
    
                .nice-select ul li.on {
                    /* 选中后的颜色 */
                    background-color: #e0e0e0;
                }
    
    
            }

    琥珀君的博客
  • 相关阅读:
    python dict 与json的运用
    request各种请求的封装
    图片上传两种第三方库调用的封装函数
    JWT Token 生成与token的解析
    如何将windows文件传至linux
    windows 下python 环境安装
    shell的条件测试
    shell的数值运算
    shell基础认知
    cookie和代理
  • 原文地址:https://www.cnblogs.com/eliteboy/p/14252406.html
Copyright © 2011-2022 走看看