зеркало из https://github.com/mozilla/gecko-dev.git
[not part of build] using CSS to do button alignment.
This commit is contained in:
Родитель
33e8d2aea8
Коммит
b8ff04d359
|
@ -0,0 +1,48 @@
|
|||
<!--
|
||||
Simulate a standard push button using JavaScript Image objects.
|
||||
This works by defining various event handlers directly in
|
||||
the IMG element. The onMouseDown handler calls event.preventDefault()
|
||||
to inhibit a drag gesture during button tracking. Thanks to
|
||||
lordpixel@mac.com for providing sample DHTML to start from.
|
||||
-->
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Aligned Buttons</TITLE>
|
||||
<STYLE>
|
||||
IMG.button { vertical-align: top }
|
||||
IMG.defaultButton { margin-top: -4px; margin-left: -4px }
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" onMouseUp="isMouseDown=false;">
|
||||
<H1>Aligned Buttons</H1>
|
||||
<DIV>
|
||||
<IMG
|
||||
id="Cancel"
|
||||
name="Cancel"
|
||||
class="button"
|
||||
src="theme:button?width=58&height=20&title=Cancel"
|
||||
>
|
||||
<IMG
|
||||
id="OK"
|
||||
name="OK"
|
||||
class="defaultButton"
|
||||
src="theme:button?width=58&height=20&default=true&pressed=true&title=OK"
|
||||
>
|
||||
</DIV>
|
||||
<BR>
|
||||
<DIV>
|
||||
<IMG
|
||||
id="Cancel"
|
||||
name="Cancel"
|
||||
class="button"
|
||||
src="theme:button?width=58&height=20&pressed=true&title=Cancel"
|
||||
>
|
||||
<IMG
|
||||
id="OK"
|
||||
name="OK"
|
||||
class="defaultButton"
|
||||
src="theme:button?width=58&height=20&default=true&title=OK"
|
||||
>
|
||||
</DIV>
|
||||
</BODY>
|
||||
</HTML>
|
Загрузка…
Ссылка в новой задаче