css实现隐藏多余溢出文字并显示省略号
<style>
.txt{
width:200px;
border:1px solid #ddd;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
<style>
.txt{
width:200px;
border:1px solid #ddd;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
先引用jquery
mssql数据库用: order by SubString([字段名],1,1) asc 数据库用:
order by mid([字段名],1,1) asc
<script type="text/javascript">
//底部浮层显示
var signUpMain=$(window).height();//获得浏览器高度
$(window).scroll(function(){
if($(window).scrollTop()>signUpMain){//如果鼠标划动大于浏览器高度,则fix-signup显示出来, fix-signup事先css设成了disp:none
下面把jQuery获取页面及个元素高度、宽度的方法汇总,分享给大家。
/*关于我们*/
.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;}
<ul>
<li title="test">1</li>
<li>2</li>
<li class="box">3</li>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<div id="div1" class="box">看看是不是</div>
<script>
$('#div1').css('background','red')//给id是div1加红色背景
$('.box').css('background','red')//给class是box加红色背景