but to answer your question. It all depends the button you designed. But for the standards wone you will have to copy the background of your button into a new document and save as a png or jpg (make sure to slice a 1 or 3px image that can be repeated)
and then with some css3 magic you can style your button and make sure it fits the content of your button.
create the image of the left side of the button.
make sure it's much longer than it needs to be.
the right end doesn't matter:
___________________________
/
| button1.png ...
\___________________________
now create the right side of the button.
make sure it's very short, like below:
_____
\
... button2.png |
_____/
create the image of the left side of the button.
make sure it's much longer than it needs to be.
the right end doesn't matter:
___________________________
/
| button1.png ...
\___________________________
now create the right side of the button.
make sure it's very short, like below:
_____
\
... button2.png |
_____/
不,无法直接从 Photoshop Elements 转换为可缩放的 HTML 和 CSS 版本。您需要将整个按钮导出为一个大图像(并为每个按钮使用单独的图像),或者使用 CSS 自行构建按钮。
No, it's not possible to convert directly from Photoshop Elements to a HTML and CSS version that scales. You need to either export the whole button as one big image (and use a separate image for each button), or construct the button yourself with CSS.
It's not a good idea to use Photoshop for creating code. It creates god awful looking code. It's best to just slice and name your slices, save them to images and then write code by hand. Unfortunately it's a very manual process and bridging the gap between design and code isn't something humans have done well yet!
发布评论
评论(5)
有很多教程会教你将 Photoshop 切片为 html 和 html。 css
http://net.tutsplus.com/tutorials/site-builds/from-psd-to-html-building-a-set-of-website-designs-step-by-step/
http://net.tutsplus.com/articles/news/photoshop-to-html-upcoming-ebook-from-nettuts-and-rockable/
但回答你的问题。这完全取决于您设计的按钮。但对于标准wone,您必须将按钮的背景复制到新文档中并另存为png或jpg(确保切片可以重复的1或3px图像)
,然后使用一些css3魔法您可以设置样式您的按钮并确保它适合您的按钮的内容。
例如:
背景的 url 应指向图像,并且当按钮太大时最好添加匹配的背景颜色
there are a lot of tutorials that will teach you to slice photoshop to html & css
http://net.tutsplus.com/tutorials/site-builds/from-psd-to-html-building-a-set-of-website-designs-step-by-step/
http://net.tutsplus.com/articles/news/photoshop-to-html-upcoming-ebook-from-nettuts-and-rockable/
but to answer your question. It all depends the button you designed. But for the standards wone you will have to copy the background of your button into a new document and save as a png or jpg (make sure to slice a 1 or 3px image that can be repeated)
and then with some css3 magic you can style your button and make sure it fits the content of your button.
eg:
the url to the background should point to the image and best add a matching background color when the button is to big
你想要做的事情有很多很多不同的解决方案。这里只是几个:
1. 您可以仅使用 css3 创建按钮
警告:此解决方案将无法在没有 javascript 插件
html
css 的
旧版浏览器上工作2. 您可以使用 2 个图像 photoshop 创建按钮
:
html
css
这些只是几个变化。
编辑:抱歉。上面的代码是错误的。我刚刚修好了。
What you're trying to do has many, many different solutions. Here are just a couple:
1. You could create the button using css3 only
warning: this solution will not work on older browsers without javascript plugins
html
css
2. You could create the button using 2 images
photoshop:
html
css
These are just a couple variations.
EDIT: apologies. the above code was wrong. i fixed it just now.
不,无法直接从 Photoshop Elements 转换为可缩放的 HTML 和 CSS 版本。您需要将整个按钮导出为一个大图像(并为每个按钮使用单独的图像),或者使用 CSS 自行构建按钮。
No, it's not possible to convert directly from Photoshop Elements to a HTML and CSS version that scales. You need to either export the whole button as one big image (and use a separate image for each button), or construct the button yourself with CSS.
sexybuttons - http://www.oscaralexander.com /tutorials/how-to-make-sexy-buttons-with-css.html 可以在 Photoshop 中创建一个按钮,一旦你用 CSS 构建了它,它就会根据你放入的任何文本调整其宽度,至于身高……不确定。
Sexybuttons - http://www.oscaralexander.com/tutorials/how-to-make-sexy-buttons-with-css.html would let to create a button in Photoshop and once you have built it in CSS it would adjust its width to whatever text you put in it, as for height...not sure.
使用 Photoshop 来创建代码并不是一个好主意。它创建了看起来很糟糕的代码。最好只是切片并命名切片,将它们保存到图像中,然后手动编写代码。不幸的是,这是一个非常手动的过程,而弥合设计和代码之间的差距并不是人类做得很好的事情!
It's not a good idea to use Photoshop for creating code. It creates god awful looking code. It's best to just slice and name your slices, save them to images and then write code by hand. Unfortunately it's a very manual process and bridging the gap between design and code isn't something humans have done well yet!