解决IE6下png图片不透明的问题

2010年09月4日 at 12:53 上午 Filed in:杂七杂八 No Comments

IE6是样式设计的时候很多人都深恶痛绝的,除了它的排版难度大,位置飘忽,fixed无视之外,还有一点是让人无法忍受的:不支持透明的png 24(png 8支持,但效果和gif几乎一样)图片。

今天早上起来看到黑压压的各种网站,所以无聊找了一下解决办法。主要通过DD_belatedPNG.js来完成。

使用方法

1.下载DD_belatedPNG.js文件。【点这里下载】

2.找到你需要添加的元素名称,可以是id或者class名称,例如添加到元素class=”pic”,pic有background为png图片的属性。就可以在需要的地方(如header.php文件)加入内容如下:

<!--[if IE 6]>
<script type="text/javascript" src="http://axiu.me/wp-content/themes/Summ/js/DD_belatedPNG.js" ></script>

<script type="text/javascript">
DD_belatedPNG.fix('.pic');
</script>
<![endif]-->

3.在IE6下刷新页面,就可以进行预览了。

实际效果及后话

图片演示可以在IE6下看我首页的边栏订阅图标,或者文章缩略图镜面效果。

当然,除此之外,还有很多方法可以解决IE6下png图片的透明问题,这里就不再一一介绍了。

» 转载请注明来源:Axiu’s blog » 《解决IE6下png图片不透明的问题》

刚买了一本《用户体验的要素》在读

2010年06月4日 at 2:04 下午 Filed in:杂七杂八 评论关闭

用户体验对于网站来说非常重要,一直在关注。

今天买了一本书来,认真的学学。~

我的围脖 http://t.sina.com.cn/cmosan

第一次w3c验证~

2010年05月13日 at 5:26 下午 Filed in:杂七杂八 评论关闭

刚切的一个页,以前没有在意W3C验证,也从来没有验证过。这次客户要求通过W3C验证,所有就验证了下,代码用Dreamweaver cs4 编写,整页基本很少图片,验证过程仅一个问题就是一个img 标签的alt属性没有写。有需要的可以下载看看,欢迎讨论。

页面演示如下:

Find What Works.jpg

今天新做的oa系统界面(更新)

2010年05月10日 at 5:10 下午 Filed in:前端开发 评论关闭

5月21日修改稿:

今天刚做的oa系统界面,axure 设计,只是界面,基本没有什么交互,有兴趣的朋友可以下载看看,评下。

上图:

Home.png

下载地址:oa.7z

YUI css 介绍 (新学 转)

2010年05月6日 at 4:36 下午 Filed in:杂七杂八 评论关闭

声明:本文内容大部分翻译自YUI 文档,加上一些个人的理解。

YUI CSS 由四个部分组成: Reset, Base, Fonts, Grids . 如果想阅读官方文档,请按照此顺序阅读这四个部分。

1、Reset

Reset用来消除各种浏览器之间对HTML元素样式表现的差异,从而提供一致的样式。比如margin, padding, border设置为0; 字体大小设置为YUI的默认大小,去除斜体和粗体样式; list-style设置为none等.

使用Reset后的例子可以参见 http://developer.yahoo.com/yui/examples/reset/reset-simple_source.html

Reset的特性包括:

Continue Reading

asp运行环境造成access乱码问题

2010年05月4日 at 1:56 下午 Filed in:杂七杂八 评论关闭

起因:

刚给威客的朋友做了一个编码修改的问题,原来程序是gb2312的,因为是对国外的一个网站,所以需要修改为utf-8。后台是良精CMS ,初看很简单,改一下模板就行。于是修改、测试(因为没有本地配置的asp环境,从网上下载了小旋风)。

问题:

测试网页全部正确无乱码。

但是所有js调用的数据全部乱码,因以前没有遇到过类似情况,在网上查资料显示这种情况只需要在网页前面填写如下代码:

<%@ CODEPAGE=65001 %>
<% Response.CodePage=65001%>
<% Response.Charset=”UTF-8″ %>

于是添加、测试居然提示错误。

解决:

经判断代码正确,和小旋风比较简单有关,于是上传到主机测试,问题解决。

留此记录,以备后用。

Powerline technology to be standardized

2010年04月22日 at 1:30 下午 Filed in:杂七杂八 评论关闭

A big shortcoming of powerline adapters is the fact that they tend not to interoperate across Logo_HomePlug_270x166.jpgvendors. For example, the adapters made by Cisco are unlikely to work with products made by Netgear. This is because the powerline market has been fragmented and does not have a common standard. However, this is about to change.

The HomePlug Powerline Alliance announced Tuesday that an initial sponsor ballot was passed for the IEEE P1901, the working group that develops the global standard for high-speed powerline communications. This is an important step toward establishing a global standard for powerline (PLC) networking.

According to the Alliance, the ballot was passed with over 80 percent of affirmative votes, demonstrating the overwhelming industry support behind 1901. Final ratification of the standard is expected in the third quarter of 2010. For general consumers, the fact that PLC is going to be an internationally recognized IEEE standard means manufacturers can provide the assurance of product interoperability. This is much like the ratification of the IEEE 802.11N wireless standard (also known as Wireless-N) last September.

Currently, due to the maturity of the draft standard, the P1901 specification is only available via purchase through the IEEE’s online store. The draft standard gives interested parties the ability to start developing smart-grid applications as well as next-generation broadband solutions that comply with P1901. The HomePlug Alliance says that it is also finalizing the new HomePlug “Green PHY” specification as part of the IEEE 1901. This specification will provide a low-power smart energy/smart grid standard, meeting the IP networking requirements of utility companies and appliance manufacturers.

According to the organization, the HomePlug AV standard, which has been widely followed by many powerline vendors, was used as the baseline technology for the IEEE 1901 powerline networking standard. This means future products that are compliant to 1901 could be interoperable with millions of HomePlug AV products in the market today. The HomePlug Powerline Alliance will serve as the certification body for IEEE 1901 devices in a similar way as the Wi-Fi Alliance certifies IEEE 802.11 wireless networking devices.

转自:cnet

3G 业务遭遇瓶颈

2010年04月22日 at 12:53 下午 Filed in:杂七杂八 评论关闭

本来学通信,但由于并没有从事相关的工作,所以这两年对这些也了解的不怎么详细。只是知道国内3G了些日子了。

前几天因为项目上的设备原因了解到了某公司(以下简称A)的3G网的一个相关的解决方案,再加上最近网上关于3G计费规则的一些新闻,突然发现3G的发展遇到了一个不小的瓶颈–数据业务带来的大流量问题,由于前期对于3G的宣传过于强调上网速度再加上现在的P2P、流媒体等协议的流行,使得少数用户占用了3G网络有限的带宽,造成用户体验的逐渐下降。其实这个问题也一直存在,A的工程师谈到他们在欧洲、美国、香港等地区的网络运营商通过他们的产品实现区别计费就是针对这个问题的,但是我认为这样同样造成了用户体验的下降,所以我不是很认同这样的解决方案,前一段时间联通的M/T计费方式就引来了一片骂声。也从网上了解了一些这方面的解决方案,没有发现哪一个方案可以很完美的解决这个问题的。

一般现在考虑的解决办法是扩展WIFI和femtocell等于是增加无线网络到有线网络的接入点数量,但是我国的用户数量和密度不是美国或欧洲可比的,在初期的阶段也许可以得到改善,但是就长远的用户数量增长的情况来看,在一个不长的时间内应该就会再出问题。就我个人现在想到的最好的解决方案应该是A的设备实现流量控制,对于不同协议开放不同的带宽,根据用户需求制定相关的优先级(例如首先要保证用户基本的浏览需求,然后是下载需求),以满足正常的情况下的用户需求,同时WIFI和Femtocell方式进行扩展。

以上仅代表本人观点。转载请注明出处( 默小土’s Blog http://www.cmosan.com )

css常用缩写规则

2010年04月22日 at 7:54 上午 Filed in:前端开发 评论关闭

使用缩写可以帮助减少你CSS文件的大小,更加容易阅读。css缩写的主要规则如下:

颜色

16进制的色彩值,如果每两位的值相同,可以缩写一半,例如:
#000000可以缩写为#000;#336699可以缩写为#369;

盒尺寸

通常有下面四种书写方法:

  • property:value1; 表示所有边都是一个值value1;
  • property:value1 value2; 表示top和bottom的值是value1,right和left的值是value2
  • property:value1 value2 value3; 表示top的值是value1,right和left的值是value2,bottom的值是value3
  • property:value1 value2 value3 value4; 四个值依次表示top,right,bottom,left

方便的记忆方法是顺时针,上右下左。具体应用在margin和padding的例子如下:
margin:1em 0 2em 0.5em;

边框(border)

边框的属性如下:
Continue Reading

Web 开发与设计之 Google 兵器谱

2010年04月22日 at 7:53 上午 Filed in:前端开发 评论关闭

Google 的使命是 Web,在 Google 眼中,未来的一切应用都将 Web 化,一直以来,Google 为 Web 开发与设计者推出了大量免费工具,让他们更好地创建,维护,改善他们的 Web 站点,这些工具包含了开发,分析,维护,修补等等用途,本文将介绍15款这样的工具。

1. Google Chrome Developer Tools

这是 Google Chrome 中类似 Firefox Firebug 以及 Web Developer Toolbar 的一个扩展,用于调试你的网页,包含一个 DOM 探测器,一个 JavaScript 调试台,可以设置执行断点和跟踪,一个类似 YSlow 的执行分析器。

Continue Reading