---
title: "css sometime cause the defaule as we think that is done by js"
author: "tsailer"
date: "2011-08-18T17:02:02Z"
tags: []
categories: ["Web前端"]
slug: "css-sometime-cause-the-defaule-as-we-think-that-is-done-by-js"
draft: false
lastmod: "2011-08-19T11:15:02Z"
id: 1152556
url: "https://tsailer.iteye.com/blog/1152556"
---

```java
.c{height: height: 1%;}
```

导致

```java
var h2 = $(".c").outerHeight(true);
alert(h2);//弹出2
```


然后我改为

```java
.c{height:auto;}
```


```java
var h2 = $(".c").outerHeight(true);
alert(h2);//弹出正常
```

因为我的原页面是aaa.html，参考页是aaa_test.html
页面中都有
```java
<ul class="c">
```

只是aaa.html和aaa_test.html引用的样式文件不同，我刚开始一直认为它们相同...

以下跟主题无关

> /^[\d]{6,12}$/
> height:expression(parseInt(this.height) < 15 ? "15px" : "200px");