

chat:
html:<textarea placeholder="请输入聊天内容" class="chat"></textarea>
css: .chat{background:green;height:100px;width:30%;float:left;box-sizing:border-box;}
home:
html:<div class="home">
<p> 这里是首页组件!</p>
</div>
css: .home{background:red;height:100px;width:70%;float:left;box-sizing:border-box;}
product:
html:<div class="product">
<p>这里是商品信息组件</p>
<p>商品ID是:{{productId}}</p>
<a [routerLink]="['./']">商品描述</a>
<a [routerLink]="['./seller',99]">销售员信息</a>
<router-outlet></router-outlet>
</div>
css: .product{background:yellow;height:100px;width:70%;float:left;box-sizing: border-box;}
求助,真的不知道是什么地方错了!打开F12,把home或者product样式里float前面的勾取消再选上,样式就对了,但是刷新后还是变成之前错位的情况了,感觉不是代码问题?????
Angular新特性,教你熟练使用 Angular 和 Typescript 开发组件式单页应用
了解课程