Home Web Front-end HTML Tutorial 前端工程师技能之photoshop巧用(从效果图到雪碧图)4--优化篇_html/css_WEB-ITnose

前端工程师技能之photoshop巧用(从效果图到雪碧图)4--优化篇_html/css_WEB-ITnose

Jun 24, 2016 am 11:37 AM

【新建】把需要的内容拖到新的文件里,或者复制粘贴到新的文件里。背景内容要选择透明

【补充】图片各种格式及特点
  jpg:不支持透明半透明,所有空白区域填充白色(高清图)
  gif:支持透明,不支持半透明(小图标,支持动画)
  png8:支持透明,不支持半透明(小图标,不支持动画)
  png24:支持透明,也支持半透明(半透明的图片)

【保存】:为保证图片质量,保留一份psd,在psd文件上进行修改。保存其他类型的图片时会对图片进行一定的压缩,如果不在psd上,而是在其他类型的图片上进行修改并保存,会导致图片像素点的丢失。所以每一份需要保存的图片要都保存一份psd源文件
  [1]当图片色彩丰富且无透明要求时,建议保存为jpg格式并选择合适的品质,一般为60-80
  [2]当图片色彩不太丰富时无论有无透明要求,保存为PNG8格式(特点是只有256种颜色,文件本身比较小),保存时选择无仿色,无杂边
  [3]当图片有半透明要求时,保存PNG24格式(对图片下进行压缩,所有相对比较大)

【修改维护】

  【1】放大画布 :图像 -> 画布大小【alt+ctrl+c】 -> 选择定位位置(一般为左上角) 

  【2】减小画布

    [注意]PNG8的颜色模式默认为索引颜色模式,在修改png8图片时需要更改其颜色模式为RGB模式,步骤为图像 -> 模式 -> RGB颜色

    [1]选择 图像 -> 裁切 选择基于左上角像素颜色,可以实现自动裁切的效果

     [2]先选定要保留的区域,然后选择 图像 -> 裁剪或者选择工具栏中的裁剪工具按钮进行裁剪

  【3】移动图标
    [1]若图标为独立图层,则用移动工具拖动即可

    [2]若图标为非独立图层
      [a]先用选区工具选中图标区域,再用移动工具拖动图标,这样可以移动该图层
      [b]先用选区工具选中图标区域,再剪切【ctrl+x】,粘贴【ctrl+v】,可以将原来的图层分成两个图层,更有利于操作

【合并】

  [1]图片在合并之前必须保留空隙
    [a]如果是小图标,留的空隙可适当小一些,一般20像素左右
    [b]如果是大图标,要留的空隙就要大一点,因为大图标在调整的时候,影响到的空间也会比较大


  [2]图片的排列方式有横向和纵向


  [3]合并-分类的原则
    [a]把同属于一个模块的图片进行合并


    [b]把大小相近的图片进行合并


    [c]把色彩相近的图片进行合并


    [d]综合以上方式合并


  [4]合并推荐
    [a]只本页用到的图片合并
    [b]有状态的图标合并

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update? Difficulty in updating caching of official account web pages: How to avoid the old cache affecting the user experience after version update? Mar 04, 2025 pm 12:32 PM

The official account web page update cache, this thing is simple and simple, and it is complicated enough to drink a pot of it. You worked hard to update the official account article, but the user still opened the old version. Who can bear the taste? In this article, let’s take a look at the twists and turns behind this and how to solve this problem gracefully. After reading it, you can easily deal with various caching problems, allowing your users to always experience the freshest content. Let’s talk about the basics first. To put it bluntly, in order to improve access speed, the browser or server stores some static resources (such as pictures, CSS, JS) or page content. Next time you access it, you can directly retrieve it from the cache without having to download it again, and it is naturally fast. But this thing is also a double-edged sword. The new version is online,

How do I use HTML5 form validation attributes to validate user input? How do I use HTML5 form validation attributes to validate user input? Mar 17, 2025 pm 12:27 PM

The article discusses using HTML5 form validation attributes like required, pattern, min, max, and length limits to validate user input directly in the browser.

How to efficiently add stroke effects to PNG images on web pages? How to efficiently add stroke effects to PNG images on web pages? Mar 04, 2025 pm 02:39 PM

This article demonstrates efficient PNG border addition to webpages using CSS. It argues that CSS offers superior performance compared to JavaScript or libraries, detailing how to adjust border width, style, and color for subtle or prominent effect

What are the best practices for cross-browser compatibility in HTML5? What are the best practices for cross-browser compatibility in HTML5? Mar 17, 2025 pm 12:20 PM

Article discusses best practices for ensuring HTML5 cross-browser compatibility, focusing on feature detection, progressive enhancement, and testing methods.

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

How do I use the HTML5 <time> element to represent dates and times semantically? How do I use the HTML5 <time> element to represent dates and times semantically? Mar 12, 2025 pm 04:05 PM

This article explains the HTML5 &lt;time&gt; element for semantic date/time representation. It emphasizes the importance of the datetime attribute for machine readability (ISO 8601 format) alongside human-readable text, boosting accessibilit

See all articles