易截截图软件、单文件、免安装、纯绿色、仅160KB

HTML表格专有属性和CSS


HTML表格很容易上手,一堆tr加td就可以显示一张表格了。复杂一点就是再加上th,colgroup,tbody,tfooter,caption之类。这些HTML里面的各种元素的确加强了表格的实用性和语义化,但table本身就有很大学问哦,毕竟是整个表格的根啊!
今天下面要总结包含对table本身的属性归纳和table专用的CSS比较:
attributes VS CSS properties
第一个比较容易混淆的是table的border属性和CSS中的border:
Attribute
border='1' //Sets or retrieves the width of the border to draw around the object. 
CSS
border-style:solid; //only set the border of the table, NOT the border inside table
border-width:1px;
border-color:#ccc;
if you set the border like table.border = 2; it will refer to the first border
第二个是Cellspacing和border-spacing
Attribute
cellspacing Sets or retrieves the amount of space between cells in a table. 
CSS
border-spacing:20px; the same as cellspacing, NOT for IE7/6
this two will work only if the border-collapse is separate
第三个是cellPadding,只有属性,没有对应的CSS
cellpadding: Sets or retrieves the amount of space between the border of the cell and the content of the cell.
there is no CSS property can do this
第四个table专有CSS:border-collapse, 决定border是独立还是聚拢
CSS border-collapse:collapse/separate;
This declaration takes two values:
  1. separate: keep borders separate. This is the default.
  2. collapse: merge borders of adjoining cells.
第五个table专有CSS: empty-cells
CSS empty-cells
empty-cells is not supported by IE.
This declaration takes two values:
  1. show: show empty cells (with a border). This is the default.
  2. hide: hide empty cells.
第六个table专有CSS:caption-side
CSS caption-side
Not supported by IE Windows.
Mozilla supports two extra values.
caption-side takes four values, even though W3C specifies only the first two:
  top. This is the default.
  bottom. This is the other official value.
  left. Mozilla extension.
  right. Mozilla


相关文档:

HTML中Select不用Disabled实现ReadOnly的另类实现

HTML中Select不用Disabled实现ReadOnly的另类实现.
<select onbeforeactivate="return false" onfocus="this.blur()" onmouseover="this.setCapture()" onmouseout="this.releaseCapture()">
<option>1</option>
</select>   ......

asp.net 将HTML文件当ASPX文件解析

首先在应用程序的WEB.CONFIG修改如下节点。
<httpHandlers>
    <add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory"/>
</httpHandlers>
<assemblies>
    <buildProviders>
        <add ext ......

JSF+HTML标签总结

*页面的开头
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
<%@ taglib uri="http://jsftutorials.net/htmLib" prefix="htm"%>
<%@ tagl ......

MyEclipse不识别jsp页面中的html标记?

如何知道不识别了呢?
MyEclipse--window--Preperences--MyEclipse--Files and Editors--XML--XML Catalog(若出现红色的叉号表示XML识别不了);
新建user_catalog.xml
(其中I:/Eclipse/CommonPlugins/DTD/ 目录下放置各种从网上下载的dtd文件)
如想添加新的dtd文件,修改此配置文件即可。
<?xml version="1.0" en ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号