25
2018
04

css实现隐藏多余溢出文字并显示省略号

<style>

.txt{

    width:200px;

    border:1px solid #ddd;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

}

</style>

25
2018
04

JQuery实现提交(submit)表单时候验证所有文本框input是否为空

  1. 先引用jquery  

25
2018
04

asp中按字母来排序

mssql数据库用:
order by SubString([字段名],1,1) asc

数据库用:
order by mid([字段名],1,1) asc


24
2018
04

jQuery获取页面高度下拉则出现一个css层

<script type="text/javascript">

//底部浮层显示

var signUpMain=$(window).height();//获得浏览器高度

$(window).scroll(function(){

  if($(window).scrollTop()>signUpMain){//如果鼠标划动大于浏览器高度,则fix-signup显示出来, fix-signup事先css设成了disp:none

24
2018
04

jQuery获取页面及个元素高度、宽度的总结——超实用

下面把jQuery获取页面及个元素高度、宽度的方法汇总,分享给大家。

16
2018
04

css当前页面效果

/*关于我们*/

.x_about{ width:1148px; min-width:1148px; margin:0px auto; border:1px solid #CCC; background:#ffb000; overflow:hidden}

.x_about .box1{ float:left; width:960px; padding:15px; height:auto; background:#FFF; border-right:1px solid #CCC; min-height:300px;}

15
2018
04

jquery选择元素中的filter过滤用法

<ul>

<li title="test">1</li>

<li>2</li>

<li class="box">3</li>

15
2018
04

jquery基数偶数选择元素加背景

<ul>

<li>1</li>

<li>2</li>

<li>3</li>

15
2018
04

jquery选择第几个或是第一个或是最后一个li元素加背景

<ul>

<li>1</li>

<li>2</li>

<li>3</li>

15
2018
04

jquery选择元素

<div id="div1" class="box">看看是不是</div>

<script>

$('#div1').css('background','red')//给id是div1加红色背景

$('.box').css('background','red')//给class是box加红色背景