实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
AخA
 
1
<!doctype html>
2
<html lang="en">
3
<head>
4
  <meta charset="utf-8">
5
  <title>jQuery UI 选择(Selectable) - 显示为网格</title>
6
  <link rel="stylesheet" href="//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css">
7
  <script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
8
  <script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
9
  <link rel="stylesheet" href="jqueryui/style.css">
10
 
11
  <style>
12
  #feedback { font-size: 1.4em; }
13
  #selectable .ui-selecting { background: #FECA40; }
14
  #selectable .ui-selected { background: #F39814; color: white; }
15
  #selectable { list-style-type: none; margin: 0; padding: 0; width: 450px; }
16
  #selectable li { margin: 3px; padding: 1px; float: left; width: 100px; height: 80px; font-size: 4em; text-align: center; }
17
  </style>
18
  <script>
19
  $(function() {
20
    $( "#selectable" ).selectable();
21
  });
22
  </script>