zoukankan      html  css  js  c++  java
  • 有用的前端demo

    js定时器循环切换字体和背景颜色
    <
    script type="text/javascript"> var flashId = 0; setInterval(function(){ if(flashId++ == 1) { flashId = 0; $('#title').css({color: 'white'}); $('#add').removeClass('add-red').addClass('add-green'); }else{ $('#title').css({color: 'red'}); $('#add').removeClass('add-green').addClass('add-red'); } }, 500); </script> <ul class="header"> <li class="left white" id="title"><h1>2016微信最火账号曝光</h1></li> <li class="right"><span id="add" class="add-green" style="80px;margin-right:-45px;" >+免费加入</span></li> </ul>
    固定在页面底部的button
    
    <div class="msg" style="margin-top:10px;">
    	<div class="weui_msg">
            <div class="btn-wrap">
                <div class="btn-return">查看排行</div>
            </div>
    	</div>
    </div>
    <style>
    .btn-wrap {
        position: fixed;
         100%;
        height: 50px;
        bottom: 0;
        background-color: rgba(0,0,0,.7);
        max- 640px;
    }
    .btn-return {
        height: 30px;
        line-height: 30px;
         100px;
        background: #fff;
        color: #528C10;
        border-radius: 10px;
        text-align: center;
        margin: 0 auto;
        margin-top: 10px;
    }
    
    css 如何控制ul li 每行显示几个并换行
    
    <style>
    ul{overflow:hidden;width:100%;}
    ul li{width:33.333%;float:left;}
    </style>
    <ul>
      <li>111</li>
      <li>222</li>
      <li>333</li>
      <li>444</li>
      <li>555</li>
      <li>666</li>
    </ul>



  • 相关阅读:
    lodash kebabCase
    lodash escapeRegExp 转义正则特殊字符
    lodash capitalize 首字母大写
    lodash camelCase 驼峰写法
    lodash pick
    lodash random
    lodash round
    Linux 目录结构
    每天一个linux命令(6/18):lsof命令
    Linux 内核编译步骤及配置详解
  • 原文地址:https://www.cnblogs.com/zhoumeng780/p/5105245.html
Copyright © 2011-2022 走看看