欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

div+css

shiping1 的头像

前端学习

!!!记住一定要清除浮动.txt

background:url(../images/logobg.jpg) rrepeat-x left top;

 

我们有时发现ie6的margin不起作用
我们就把ie6的这个元素设置成float:left

 

当高度不变时 line-height:越小越朝上,等于高度时在中间 ,越大 越朝下 ,

 

div 在 object上面

 1)<object里增加  <param value="transparent" name="wmode">

2)embed标签可以在标签中加入  wmode="transparent"  
好像是两个加起来才有用

 

普通分类: 
shiping1 的头像

幻灯片例子

普通分类: 
shiping1 的头像

CSS white-space 属性 不换行 同一行

CSS white-space 属性

普通分类: 
shiping1 的头像

怎么解决IE6下 li 的 float:left 自动换行?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
* {margin:0; padding:0; font-size:12px;}
ul {list-style:none;}
#nav {width:180px; height:200px; border:1px solid red;}

普通分类: 
shiping1 的头像

css background rgba 在 ie

普通分类: 
shiping1 的头像

解决IE6浏览器下position:fixed固定定位问题

解决IE6浏览器下position:fixed固定定位问题
发布于:2011-10-05 18:07 | 点击:113 | 评论:0
使元素固定在浏览器的顶部:#top{
_position:absolute;
_bottom:auto;
_top:expression(eval(document.documentElement.scrollTop));
}使元素固定在浏览器的底部:#top{
_position:absolute;
_bottom:auto;
_top:expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-this.offsetHeight-(parseInt(this.currentStyle.marginTop,10)||0)-(parseInt(this.currentStyle.marginBottom,10)||0)));
}这两段代码只能实现在最底部跟最顶部,你可以使用 _margin-top:10px; 或者 _margin-bottom:10px; 修改其中的数值控制元素的位置。

普通分类: 
shiping1 的头像

css background

RGBA像RGB一样设置颜色,而这个”A”——RGBA中的最后一个值——允许我们设置该元素的透明度。就像opacity声明一样,一个opacity值为1的元素是完全不透明的,而一个opacity为0的元素是完全透明的。

普通分类: 
shiping1 的头像

img 图像丢失

img  图像丢失 onerror

<img src="{{$row.userhead}}"
        onerror="this.onerror=null;this.src='http://u.szr.com/images/face/none.gif'"
        width="20" height="20" alt="{{$row.username}}的照片" />

普通分类: 
shiping1 的头像

CSS outline 属性

普通分类: 
shiping1 的头像

input 文本框 按钮用背景图

1)background 背景图

2)border:none;

 

也能用 1)它的父元素用background 背景图

普通分类: 
shiping1 的头像

css 背景透明

普通分类: 
shiping1 的头像

CSS border-style

普通分类: 
shiping1 的头像

css ie 自己亲自做的 有大用

/*  \9 是仅对IE起作用*/
margin-top:10px; margin-bottom:10px\9;




/* 下面这些在 css 要严格按顺序  */

width:150px;            /*普通浏览器*/
width\0:140px ;         /*为ie8*/
*+width:130px ;         /*为ie7*/

_width:120px ;  或者     *width:120px ;   /*为ie6*/

(*width:120px ; 假如没有 *+时,也对 IE7起作用)
(_width:120px ; 假如没有 *+时,也仅对 IE6起作用)






/*只适用于ie6,好像是不适用于ie7 */
*html  .aaaa{
width:140px;
}

*html{
background-image:url(about:blank);
background-attachment:fixed;

普通分类: 
shiping1 的头像

CSS实现跨浏览器兼容性的盒阴影效果

一、无关紧要碎碎念

在web页面的ui表现中,投影效果可以说是非常常见的一种表现效果了。例如开心网的头像修饰效果:
开心网头像投影效果 张鑫旭-鑫空间-鑫生活

然而,在CSS2的时代,我们多半使用图片实现类似效果,或是使用CSS其他属性模拟阴影效果,但是,现在,CSS3的崛起使得这个问题已经不再是是个问题了,本文就将展示如何实现跨浏览器的盒阴影效果。

二、标准方法

标准方法当然就是指使用CSS3的方法了,这个应该不少同行应该知道,参见如下代码:

普通分类: 
shiping1 的头像

html链接到邮箱

<a href="mailto:1052889979@qq.com" >校长信箱</a>

普通分类: 

各种页面高度

CSS专题(三):页面高度发微

一 背景

  本文不讨论普通元素的大小和位置,仅仅讨论页面的大小和位置,而且为了简化问题,本文只讨论高度与顶部距离。笔者发现,页面的宽度与高度的表现有很多不同,细心的朋友会发现,故页面宽度另起文讨论,文章已经写好,见页面宽度发微

普通分类: 

table 边框 及 边框颜色 有大用

第0种  表格边框的一种方法
普通分类: 

div在object上面 透明效果 遮挡 覆盖

div在object上面

 

 1)<object里增加  <param value="transparent" name="wmode">

2)embed标签可以在标签中加入   wmode="transparent" 
(如果不行的话 再加上 value="transparent" )
好像是1)和2)两个加起来才有用

普通分类: 

top 固定在网页头部

//普通浏览器 固定在网页头部

#top{
    position:fixed;
    left :0px;
    top:0px;

}

//ie6 固定在网页头部

#top{
_position:absolute;
_bottom:auto;
_top:expression(eval(document.documentElement.scrollTop));
}

普通分类: 

颜色代码颜色代码大全视图参照表对照表

颜色代码

#ccc, #666灰色

#FF0000 红色

 

普通分类: 

无法确定html元素时 我们加上边框或背景颜色

无法确定html元素时 我们加上边框 border 或背景颜色 background

普通分类: 

word-wrap: break-word; word-break: break-all 文字自动换行 中文 东亚 英文单词 有大用

********“  word-wrap: break-word; word-break: break-all;  ”**********
**********这个常常用到*****************

是为了单词自动换行的 特别是在ie6中常常用到



 

普通分类: 

html里是否是ie 来进行执行html代码 假如ie6 有大用 有大用

http://en.wikipedia.org/wiki/Conditional_comment

ifie if ie

html里是否是ie 来进行执行html代码

下面这四个是绝对ok

//下面是 IE6
<!--[if IE 6]>
<link rel="stylesheet" href="<?php echo $base_path . $directory; ?>/style.ie6.css" type="text/css" />
<![endif]-->

普通分类: 

所有的链接都在新窗口打开

<head>

普通分类: 

html a标签position为absolute时,IE浏览器无法显示为块(也就是ie6或ie7可能无法起作用)

html a标签position为absolute时,IE浏览器无法显示为块

如果给a加上一个background属性,颜色或图片都可以

 

普通分类: 

ie6浮动元素双边距

由于这个 Bug 对于 'display' 特性为 'inline' 的元素不会触发,所以可以通过设置 display:inline 消除此 Bug,由于此 Bug 仅在元素浮动时发生,而浮动将使该元素 'display' 特性计算为 'block' 或者 'table'(见 CSS2.1 规范第 9.7 Relationships between 'display', 'position', and 'float' 节),因此可以通过设置 display:inline 消除双边距 Bug。

普通分类: 

css 实现层半透明,且块内文字不透明(兼容ie6等各种浏览器)

 

我一般用的是 #divJeepDiv  {  
         filter:  alpha(opacity=50); /*ie*/

  opacity: 0.5;/*firfox*/

}

 

css 实现层半透明,且块内文字不透明(兼容ie6等各种浏览器)

兼容各浏览器且效果一致,有两种方法:

普通分类: 

弹出透明层,覆盖整个浏览器,页面元素的相对可视范围的不动 半透明层 两个div 两层div 覆盖 挡信 遮信 deepdiv

 

普通分类: 

dott_remove_ie7_OK

ow to solve the " click to activate and use this control" prompt box
To fix the problem, please follow these steps:

1) Just below the last <object> in your HTML page,
insert the following Javascript:

<script type="text/javascript" src="fixit.js"></script>

2) Open a new document in Notepad or your HTML editor,
and copy & paste the following content into it:




fixit.js的代码

普通分类: 

去掉虚线dotted a 和 video 等等 的虚框 虚线框 失去焦点? 有大用

去掉链接(包括图片链接)的虚线边框
/* for IE */
a,area { blr:expression(this.onFocus=this.blur()); }
/* for Firefox */
a:focus { outline: none; }

 


/*经检查 这个是完全好的 */
.indexTab ul li a{
    color:#313131;
    outline:none;
    blr:expression(this.onFocus=this.blur());
    }

*:focus { outline: none }

<a href="#p=01" hidefocus="true"><img src="uploadpic/2011429103167.jpg" alt="[field:title/]" /></a>

 

 

 

普通分类: 

页面

Subscribe to RSS - div+css