block.htm 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. <#def title = "块样式"/>
  2. <#def keyword = "ZhiqimUI"/>
  3. <#def desc = "块样式是指对一个块区域增加样式规则,如指定块隐藏显示、块定位、块宽、块宽百分比、块高、块高百分比、内边距、外边距等属性。"/>
  4. <#def prevUrl = "text.htm"/>
  5. <#def nextUrl = "../js/js.htm"/>
  6. ${zhiqim_com_header()}
  7. ${zhiqim_com_topnav()}
  8. ${zhiqim_com_mobileUI_scrollJs()}
  9. <!--容器开始 -->
  10. <div id="container" class="container">
  11. ${zhiqim_com_ui("tutorial", "ui", "css", "block")}
  12. <!--主体-->
  13. <div id="mainbody" class="mainbody">
  14. ${zhiqim_com_breadcrumb("文库", "教程", "块样式")}
  15. <!-- content开始 -->
  16. <div id="mobileUI_content" class="content">
  17. <!-- 左侧详情 -->
  18. <div class="mobileUI-left">
  19. <#-- 标题 -->
  20. <div class="z-relative-left z-w100p z-pd16 z-bg-blue z-px18 z-lh200p z-bold" style="border-left:5px solid #4bacc6">
  21. <p class="z-text-blue">块样式:</p>
  22. <p class="z-color-333" style="text-indent:38px;">
  23. 块样式是指对一个块区域增加样式规则,如指定块隐藏显示、块定位、块宽、块宽百分比、块高、块高百分比、内边距、外边距等属性。
  24. </p>
  25. </div>
  26. <#-- 一、块定位 -->
  27. <div class="tutorial title">一、块定位</div>
  28. <table class="z-table z-bordered z-pd10 z-px14">
  29. <tr bgcolor="#f5f5f5">
  30. <td width="18%">名称</td>
  31. <td width="*">样式</td>
  32. <td width="20%">说明</td>
  33. </tr>
  34. <tr>
  35. <td class="z-samp">
  36. .z-fixed<br>
  37. .zi-fixed
  38. </td>
  39. <td><pre class="z-text-preline">
  40. .z-fixed{position:fixed;}
  41. .zi-fixed{position:fixed !important;}
  42. </pre></td>
  43. <td>固定定位</td>
  44. </tr>
  45. <tr>
  46. <td class="z-samp">
  47. .z-absolute<br>
  48. .zi-absolute</td>
  49. <td><pre class="z-text-preline">
  50. .z-absolute{position:absolute;}
  51. .zi-absolute{position:absolute !important;}
  52. </pre></td>
  53. <td>绝对定位</td>
  54. </tr>
  55. <tr>
  56. <td class="z-samp">
  57. .z-relative<br>
  58. .zi-relative</td>
  59. <td><pre class="z-text-preline">
  60. .z-relative{position:relative;}
  61. .zi-relative{position:relative !important;}
  62. </pre></td>
  63. <td>相对定位</td>
  64. </tr>
  65. </table>
  66. <#-- 二、块浮动对齐 -->
  67. <div class="tutorial title">二、块浮动对齐</div>
  68. <table class="z-table z-bordered z-pd10 z-px14">
  69. <tr bgcolor="#f5f5f5">
  70. <td width="18%">名称</td>
  71. <td width="*">样式</td>
  72. <td width="20%">说明</td>
  73. </tr>
  74. <tr>
  75. <td class="z-samp">.z-float-left<br>.zi-float-left</td>
  76. <td><pre class="z-text-preline">
  77. .z-float-left{float:left;}
  78. .zi-float-left{float:left !important;}
  79. </pre></td>
  80. <td>左对齐</td>
  81. </tr>
  82. <tr>
  83. <td class="z-samp">.z-float-center<br>.zi-float-center</td>
  84. <td><pre class="z-text-preline">
  85. .z-float-center{margin-left:auto;margin-right:auto;}
  86. .zi-float-center{margin-left:auto !important;margin-right:auto !important;}
  87. </pre></td>
  88. <td>居中对齐</td>
  89. </tr>
  90. <tr>
  91. <td class="z-samp">.z-float-right<br>.zi-float-right</td>
  92. <td><pre class="z-text-preline">
  93. .z-float-right{float:right;}
  94. .zi-float-right{float:right !important;}
  95. </pre></td>
  96. <td>右对齐</td>
  97. </tr>
  98. </table>
  99. <#-- 三、块定位+浮动对齐 -->
  100. <div class="tutorial title">三、块定位+浮动对齐</div>
  101. <table class="z-table z-bordered z-pd10 z-px14">
  102. <tr bgcolor="#f5f5f5">
  103. <td width="23%">名称</td>
  104. <td width="*">样式</td>
  105. <td width="16%">说明</td>
  106. </tr>
  107. <tr>
  108. <td class="z-samp">
  109. .z-relative-left<br>
  110. .zi-relative-left</td>
  111. <td><pre class="z-text-preline">
  112. .z-relative-left{position:relative;float:left;}
  113. .zi-relative-left{position:relative !important;float:left !important;}
  114. </pre></td>
  115. <td>相对左对齐</td>
  116. </tr>
  117. <tr>
  118. <td class="z-samp">
  119. .z-relative-center<br>
  120. .zi-relative-center</td>
  121. <td><pre class="z-text-preline">
  122. .z-relative-center{position:relative;margin-left:auto;margin-right:auto;}
  123. .zi-relative-center{position:relative !important;margin-left:auto !important;margin-right:auto !important;}
  124. </pre></td>
  125. <td>相对居中</td>
  126. </tr>
  127. <tr>
  128. <td class="z-samp">
  129. .z-relative-right<br>
  130. .zi-relative-right</td>
  131. <td><pre class="z-text-preline">
  132. .z-relative-right{position:relative;float:right;}
  133. .zi-relative-right{position:relative !important;float:right !important;}
  134. </pre></td>
  135. <td>相对右对齐</td>
  136. </tr>
  137. <tr>
  138. <td class="z-samp">
  139. .z-absolute-center-middle<br>
  140. .zi-absolute-center-middle</td>
  141. <td><pre class="z-text-preline">
  142. .z-absolute-center-middle{position:absolute;margin:auto;top:0;bottom:0;left:0;right:0;}
  143. .zi-absolute-center-middle{position:absolute !important;margin:auto !important;top:0 !important;bottom:0 !important;left:0 !important;right:0 !important;}
  144. </pre></td>
  145. <td>绝对居中,内部块在父块的上下左右居中</td>
  146. </tr>
  147. </table>
  148. <#-- 四、块溢出 -->
  149. <div class="tutorial title">四、块溢出</div>
  150. <table class="z-table z-bordered z-pd10 z-px14">
  151. <tr bgcolor="#f5f5f5">
  152. <td width="18%">名称</td>
  153. <td width="*">样式</td>
  154. <td width="40%">说明</td>
  155. </tr>
  156. <tr>
  157. <td class="z-samp">.z-overflow-auto</td>
  158. <td><pre class="z-text-preline">
  159. .z-overflow-auto{overflow:auto;}
  160. </pre></td>
  161. <td>块溢出自动设置,指定高度,当内部超时时显示滚动条</td>
  162. </tr>
  163. <tr>
  164. <td class="z-samp">.z-overflow-hidden</td>
  165. <td><pre class="z-text-preline">
  166. .z-overflow-hidden{overflow:hidden;}
  167. </pre></td>
  168. <td>块溢出的部分不显示</td>
  169. </tr>
  170. <tr>
  171. <td class="z-samp">.z-overflow-scroll</td>
  172. <td><pre class="z-text-preline">
  173. .z-overflow-scroll{overflow:scroll;}
  174. </pre></td>
  175. <td>块始终显示滚动条,不管内部高度是否超过</td>
  176. </tr>
  177. <tr>
  178. <td class="z-samp">.z-overflow-x-auto</td>
  179. <td><pre class="z-text-preline">
  180. .z-overflow-x-auto{overflow-x:auto;}
  181. </pre></td>
  182. <td>块X轴溢出自动设置,指定高度,当内部超时时显示滚动条</td>
  183. </tr>
  184. <tr>
  185. <td class="z-samp">.z-overflow-x-hidden</td>
  186. <td><pre class="z-text-preline">
  187. .z-overflow-x-hidden{overflow-x:hidden;}
  188. </pre></td>
  189. <td>块X轴溢出的部分不显示</td>
  190. </tr>
  191. <tr>
  192. <td class="z-samp">.z-overflow-x-scroll</td>
  193. <td><pre class="z-text-preline">
  194. .z-overflow-x-scroll{overflow-x:scroll;}
  195. </pre></td>
  196. <td>块X轴始终显示滚动条,不管内部高度是否超过</td>
  197. </tr>
  198. <tr>
  199. <td class="z-samp">.z-overflow-y-auto</td>
  200. <td><pre class="z-text-preline">
  201. .z-overflow-y-auto{overflow-y:auto;}
  202. </pre></td>
  203. <td>块Y轴溢出自动设置,指定高度,当内部超时时显示滚动条</td>
  204. </tr>
  205. <tr>
  206. <td class="z-samp">.z-overflow-y-hidden</td>
  207. <td><pre class="z-text-preline">
  208. .z-overflow-y-hidden{overflow-y:hidden;}
  209. </pre></td>
  210. <td>块Y轴溢出的部分不显示</td>
  211. </tr>
  212. <tr>
  213. <td class="z-samp">.z-overflow-y-scroll</td>
  214. <td><pre class="z-text-preline">
  215. .z-overflow-y-scroll{overflow-y:scroll;}
  216. </pre></td>
  217. <td>块Y轴始终显示滚动条,不管内部高度是否超过</td>
  218. </tr>
  219. </table>
  220. <#-- 五、块手势 -->
  221. <div class="tutorial title">五、块鼠标标志</div>
  222. <table class="z-table z-bordered z-pd10 z-px14">
  223. <tr bgcolor="#f5f5f5">
  224. <td width="18%">名称</td>
  225. <td width="*">样式</td>
  226. <td width="40%">说明</td>
  227. </tr>
  228. <tr>
  229. <td class="z-samp">.z-pointer</td>
  230. <td><pre class="z-text-preline">
  231. .z-pointer{cursor:pointer;}
  232. </pre></td>
  233. <td>显示手标志,即可点击状态</td>
  234. </tr>
  235. <tr>
  236. <td class="z-samp">.z-forbidden</td>
  237. <td><pre class="z-text-preline">
  238. .z-forbidden{cursor:not-allowed;}
  239. </pre></td>
  240. <td>禁止使用,显示禁止标志</td>
  241. </tr>
  242. </table>
  243. <#-- 六、块隐藏和显示 -->
  244. <div class="tutorial title">六、块隐藏和显示</div>
  245. <table class="z-table z-bordered z-pd10 z-px14">
  246. <tr bgcolor="#f5f5f5">
  247. <td width="18%">名称</td>
  248. <td width="*">举例</td>
  249. <td width="40%">说明</td>
  250. </tr>
  251. <tr>
  252. <td class="z-samp">.z-hide<br>.zi-hide</td>
  253. <td><pre class="z-text-preline">
  254. .z-hide{display:none;}
  255. .zi-hide{display:none !important;}
  256. </pre>
  257. </td>
  258. <td>隐藏,不占位</td>
  259. </tr>
  260. <tr>
  261. <td class="z-samp">
  262. .z-show<br>.z-show-b<br>.z-show-ib<br>
  263. .zi-show<br>.zi-show-b<br>.zi-show-ib
  264. </td>
  265. <td><pre class="z-text-preline">
  266. .z-show{display:inline;}
  267. .z-show-b{display:block;}
  268. .z-show-ib{display:inline-block;}
  269. .zi-show{display:inline !important;}
  270. .zi-show-b{display:block !important;}
  271. .zi-show-ib{display:inline-block !important;}
  272. </pre></td>
  273. <td class="z-samp">
  274. 显示的三种状态<br>
  275. 1、z-show适用于&lt;span&gt;,&lt;a&gt;,&lt;label&gt;,&lt;input&gt;,&lt;img&gt;<br>
  276. 2、z-show-b适用&lt;div&gt;,&lt;p&gt;,&lt;h1&gt;,&lt;form&gt;,&lt;ul&gt;&lt;li&gt;<br>
  277. 3、z-show-ib适用于把块作为内联方式。
  278. </td>
  279. </tr>
  280. <tr>
  281. <td class="z-samp">.z-visible<br>.zi-visible</td>
  282. <td><pre class="z-text-preline">
  283. .z-visible{visibility:visible !important;}
  284. .zi-visible{visibility:visible !important;}
  285. </pre></td>
  286. <td>用于保留占位的显示</td>
  287. </tr>
  288. <tr>
  289. <td class="z-samp">.z-hidden<br>.zi-hidden<br></td>
  290. <td><pre class="z-text-preline">
  291. .z-hidden{visibility:hidden !important;}
  292. .zi-hidden{visibility:hidden !important;}
  293. </pre></td>
  294. <td>用于保留占位的隐藏</td>
  295. </tr>
  296. </table>
  297. <!-- 右侧demo ZmUI代码 -->
  298. ${zhiqim_com_ZmUI_demo_start()}
  299. <div class="z-bar-top">
  300. <a href="#" class="z-left"><i class="z-font z-rem18 z-arrowhead-left"></i></a>
  301. <div class="z-title">ZhiqimUI.mobile</div>
  302. </div>
  303. <div class="z-bar-bottom">
  304. <a href="#" class="z-direction-column z-active"><i class="z-font z-apps"></i><span class="z-mg-t3">文案</span></a>
  305. <a href="#" class="z-direction-column"><i class="z-font z-apps"></i><span class="z-mg-t3">文案</span></a>
  306. <a href="#" class="z-direction-column"><i class="z-font z-apps"></i><span class="z-mg-t3">文案</span></a>
  307. <a href="#" class="z-direction-column"><i class="z-font z-apps"></i><span class="z-mg-t3">文案</span></a>
  308. </div>
  309. <div class="z-container">
  310. <div class="z-flexBox-list z-h100p"><div class="z-rem30 z-text-center">这里是内容</div></div>
  311. </div>
  312. ${zhiqim_com_ZmUI_demo_end()}
  313. <!-- content结束 -->
  314. </div>
  315. ${zhiqim_com_chapter()}
  316. <!-- 主体结束 -->
  317. </div>
  318. <!-- 容器结束 -->
  319. </div>
  320. ${zhiqim_com_footer()}