CSS在MyEclipse下无法载入问题。
在JSP页面上加入
<%String path = request.getContextPath();%>
<link href="<%=path%>/css/style.css" rel="stylesheet" type="text/css">
下列方式貌似不行:
<link href="../css/style.css" rel="stylesheet" type="text/css">
<link href="../../css/style.css" rel="stylesheet" type="text/css">
相关文档:
从今天开始,CSS设计教程和大家见面了。每天一节,有学习的同学请每天关注我们网站。
例1-1 背景图片
第一个例子展示了对background属性的运用,本例子把background属性与一个div元素相结合。div的大小为250pxX76px,所以它会显示出一个完整的背景图片。
以下是本实例的详细程序,调试在Microsoft Visual Studio 2010版 ......
id和class到底要用哪一个?
首先要明白id和class的各自的优缺点。这样才能根据他们的各自的特点进行使用。
id的优点(class的缺点):id写在css用"#"选择器,class写在css中用"."选择器。"#"选择器的优先级高于"."选择器大约10倍,所以当你需要提升优先级的时候,id标签,或者id容器内的标签将是很容易和有效的。 ......
1、不要使用过小的图片做背景平铺。这就是为何很多人都不用 1px 的原因,这才知晓。宽高 1px 的图片平铺出一个宽高 200px
的区域,需要 200*200=40, 000 次,占用资源。
2、无边框。推荐的写法是 border:none;,哈哈,我一直在用这个。 border:0;
只是定义边框宽度为零,但边框样式、颜色还是会被浏览器解析,占用资 ......
body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td {
padding: 0;
margin: 0;
}
fieldset, img {
border: 0;
}
table {
border-co ......
盒子标签和属性对照
CSS语法(不区分大小写)
JavaScript语法(区分大小写)
border
border
border-bottom
borderBottom
border-bottom-color
borderBottomColor
border-bottom-style
borderBottomStyle
border-bottom-width
borderBottomWidth
border-color
borderColor
border-left
borderLeft
border ......