辅助路由那一节的样式始终不对
来源:3-6 辅助路由

人活一种心态
2017-05-04
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前面的勾取消再选上,样式就对了,但是刷新后还是变成之前错位的情况了,感觉不是代码问题?????
2回答
-
K开泰
2017-05-04
对的 ,样式不是关键 关键是逻辑交互
00 -
qq_把握现在_1
2017-05-04
错位应是浏览器原因,不要纠结错位问题,我的也是这样,主要是把知识点掌握就好
012017-05-05
相似问题