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;
                }
    
    
            }

    琥珀君的博客
  • 相关阅读:
    排序算法:冒泡排序
    排序算法: 插入排序
    排序算法:折半插入排序
    排序算法:快速排序
    浅谈C/C++回调函数(Callback)& 函数指针
    仿函数
    回溯法:求和
    动态规划:数字和为sum的方法数
    字典序
    剑指offer15 二进制中1的个数
  • 原文地址:https://www.cnblogs.com/eliteboy/p/14252406.html
Copyright © 2011-2022 走看看