辅助路由那一节的样式始终不对

来源:3-6 辅助路由

人活一种心态

2017-05-04

http://szimg.mukewang.com/590a972500015f4811040202.jpg

http://szimg.mukewang.com/590a9725000130c106730230.jpg

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

对的 ,样式不是关键 关键是逻辑交互

0
0

qq_把握现在_1

2017-05-04

错位应是浏览器原因,不要纠结错位问题,我的也是这样,主要是把知识点掌握就好

0
1
人活一种心态
嗯 我有在继续学习后面的章节,只是略微有点强迫症,想着能完美解决了就更好了。
2017-05-05
共1条回复

Angular4.0从入门到实战 打造股票管理网站

Angular新特性,教你熟练使用 Angular 和 Typescript 开发组件式单页应用

2683 学习 · 1361 问题

查看课程