---
title: "simple button overview "
author: "yiminghe"
date: "2011-02-24T11:16:48Z"
tags: ["Google", "YUI"]
categories: ["Web前端"]
slug: "simple-button-overview"
draft: false
lastmod: "2011-02-24T11:16:48Z"
id: 921096
url: "https://yiminghe.iteye.com/blog/921096"
---

采样自: [yui](http://developer.yahoo.com/yui/2/) , [closure](http://code.google.com/closure/library/) , [kissy editor](https://github.com/kissyteam/kissy-editor) ,一般 button 分为四种 ： button , toogle button , menu button , split button 。

 

# **展现层：**

 

## button

 

### yui

![](http://dl.iteye.com/upload/attachment/424237/6144f801-45d6-398a-b055-0af24fb6bc64.png)     ![](http://dl.iteye.com/upload/attachment/424239/10a2406d-5cee-36ab-8fbd-31c17c2939a9.png)   ![](http://dl.iteye.com/upload/attachment/424241/394fd5d6-6aeb-3146-ae9b-7f98a6b13cb7.png)

### google

![](http://dl.iteye.com/upload/attachment/424205/fbb805d4-2d04-3dd2-a607-71f453a8bca2.png)   ![](http://dl.iteye.com/upload/attachment/424207/b31b2b37-e0c1-365c-bb0d-81aeaa25e6b1.png)    ![](http://dl.iteye.com/upload/attachment/424209/da71e4a4-608b-3bc1-ab03-d13fbe780c3d.png)

### kissy editor

 

![](http://dl.iteye.com/upload/attachment/424225/ad3d321c-aaa8-325c-8485-be8781e4f6ce.png)    ![](http://dl.iteye.com/upload/attachment/424227/24b0a4ae-12e7-34c5-94bc-c9771260e3b7.png)

## toogle button

 

### yui

![](http://dl.iteye.com/upload/attachment/424237/6144f801-45d6-398a-b055-0af24fb6bc64.png)     ![](http://dl.iteye.com/upload/attachment/424239/10a2406d-5cee-36ab-8fbd-31c17c2939a9.png)   ![](http://dl.iteye.com/upload/attachment/424241/394fd5d6-6aeb-3146-ae9b-7f98a6b13cb7.png)     ![](http://dl.iteye.com/upload/attachment/424244/f7c88288-7c37-3fa3-88b3-eb9dab3e5fcc.png)

### google

![](http://dl.iteye.com/upload/attachment/424205/fbb805d4-2d04-3dd2-a607-71f453a8bca2.png)   ![](http://dl.iteye.com/upload/attachment/424207/b31b2b37-e0c1-365c-bb0d-81aeaa25e6b1.png)    ![](http://dl.iteye.com/upload/attachment/424209/da71e4a4-608b-3bc1-ab03-d13fbe780c3d.png)   ![](http://dl.iteye.com/upload/attachment/424211/2401c2e9-b596-3fa9-bd9f-3de52a572522.png)

### kissy editor

 

![](http://dl.iteye.com/upload/attachment/424225/ad3d321c-aaa8-325c-8485-be8781e4f6ce.png)    ![](http://dl.iteye.com/upload/attachment/424227/24b0a4ae-12e7-34c5-94bc-c9771260e3b7.png)   ![](http://dl.iteye.com/upload/attachment/424229/7b53355f-7086-3ca5-bb21-ef0be098cd2f.png)

 

## menu button

 

### yui

![](http://dl.iteye.com/upload/attachment/424246/16a74f36-a290-3b8a-a452-6b8daeb5b4c3.png)   ![](http://dl.iteye.com/upload/attachment/424250/172c782b-564e-30e3-b81d-80352ab68396.png)   ![](http://dl.iteye.com/upload/attachment/424248/6e75448b-3664-3f4b-859b-9169d721cb69.png)

### google

![](http://dl.iteye.com/upload/attachment/424213/63837d58-4931-3cad-88ca-0da54cdcbba6.png)    ![](http://dl.iteye.com/upload/attachment/424217/327c40cc-39fe-36a7-acbd-d3c8eb2e546b.png)   ![](http://dl.iteye.com/upload/attachment/424215/b6e81933-3482-3778-997f-8f34df2820f3.png)

### kissy editor

![](http://dl.iteye.com/upload/attachment/424231/8e590686-f7d7-31c2-bb78-eca016b70368.png)     ![](http://dl.iteye.com/upload/attachment/424235/e402c66a-c3aa-3803-8ab5-903b6aa6564b.png)   ![](http://dl.iteye.com/upload/attachment/424233/5351fa69-503a-322a-8dc7-7b7c8fd01241.png)

## split button

 

### yui

![](http://dl.iteye.com/upload/attachment/424252/12333e55-c511-3b4e-bb83-8da85df73648.png)    ![](http://dl.iteye.com/upload/attachment/424256/db4d9099-a21d-3d85-be38-65d173007224.png)   ![](http://dl.iteye.com/upload/attachment/424254/9749fe2b-1121-3689-bfc8-f1b0380c573b.png)

### google

![](http://dl.iteye.com/upload/attachment/424219/a7ac1bd5-c41f-3cf9-b814-f63c7e3b15d8.png)![](http://dl.iteye.com/upload/attachment/424223/bd38f8a5-c6ea-3177-bdcb-8c68c0ac4276.png)   ![](http://dl.iteye.com/upload/attachment/424221/340b6818-4f0b-3e2a-9b45-2524d9d07c60.png)

### kissy editor

 

  **TODO**

# 实现难点:

1\. 抽象，组件架构 . ( YUI , closure ,kissy TODO)

2.键盘鼠标互操作性 . ( YUI , closure , kissy TODO)

3\. wai-aria fully support ( YUI , closure , kissy TODO)

    3.1  Aria 属性与组件状态同步

    3.2  [http://www.w3.org/TR/wai-aria-practices/](http://www.w3.org/TR/wai-aria-practices/)