Sealyu

          --- 博客已遷移至: http://www.sealyu.com/blog

            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
            618 隨筆 :: 87 文章 :: 225 評論 :: 0 Trackbacks

          PNG Overlay

          17 January 2007 › 28 comments

          PNG overlay

          PNG Overlay: Example | Download (44 KB)

          Have you ever run into the problem of creating a site with pictures given by the client, only to find later after they update their photography the original look and feel is not retained? For instance, you might add a drop-shadow, rounded corners (maybe both) or some other graphical effects applied to the images. This is all well and good, but what about the webmaster or journalist who follows after you – Will he or she be able to keep the look consistent?

          In order to help remedy this potential problem, here is a solution that I came up with. Basically, it involves creating a transparent PNG overlay which can be used as a mask / frame around regular JPEG or GIF. This way, a typical CMS installation can be configured so users can upload photos without having to worry about using any graphics program to apply filters. Even if you are already a whiz with graphics, it will help save you time.

          The nice thing about this method is that you are just applying an absolutely positioned <div> with a PNG backround over the top of a regular image, so you still get the benefits of a relevant alt attribute / value pair, as well as printing images because they are technically in the foreground as far as the browser is concerned. It will even work in IE6, with the proprietary Microsoft alpha style filter applied. IE7 will handle the transparency natively.

          I am not going to go in depth and explain how to make transparent overlays, because there are already plenty of Photoshop tutorials out there. For a good explanation of how to achieve this effect in Fireworks, check out the article at solarDreamStudios. I hope this demo inspires ideas and makes life easier.



          還有一個css圓角效果: http://www.htmldog.com/examples/images3_3.html

          posted on 2009-09-23 09:54 seal 閱讀(371) 評論(0)  編輯  收藏 所屬分類: CSS
          主站蜘蛛池模板: 安岳县| 汝南县| 云龙县| 辽阳县| 黄龙县| 丰顺县| 策勒县| 五河县| 安陆市| 攀枝花市| 盐边县| 嵩明县| 乌兰察布市| 白玉县| 陆良县| 宜宾市| 阳春市| 洛宁县| 新野县| 北宁市| 南开区| 和田市| 茂名市| 南京市| 宜州市| 平湖市| 精河县| 贡觉县| 大宁县| 都兰县| 淮北市| 谷城县| 买车| 诸城市| 防城港市| 油尖旺区| 福海县| 孟连| 宁晋县| 陵水| 宣威市|