html建立大众点评页面遇到的问题

大众点评所用知识

HTML、CSS、bootstrap3


遇到的问题

因图片无法对齐
图片描述


源码:图片描述
抛弃div改用img后成功对齐


解决后成功对齐
图片描述


源码:
图片描述


导航栏文本无法右对齐.
图片描述

我想到的方法是:
div{
direction: rtl;
}

这样确实靠右了弊端也显现出来了其他地方也全部靠右了.

后来使用 text-align: right就解决了这一问题,且不干预其他行.

         <div class="row width:10px" style="text-align: right" >
            <div class="header-container top-nav top-nav-container btn btn-navbar" >
            <!-- 导航条 -->
                <div class="group">
                    <a href="#">写点评</a>
                    <span>|</span>
                    <span>                                        
                        <a href="">你好,请登录</a>
                        <a href="">免费注册</a>
                        </span>
                        <span>|</span>
                        <a href="">个人中心</a>
                        <span>|</span>
                        <a href="">商户服务</a>
                        <span>|</span>
                        <a href="">帮助中心</a>
                        <span>|</span>
                        <a href="">网站导航</a>
                </div>
            </div>
         </div>


  1. 使用相对路径过少,在其他电脑上无法正常显示。
  2. 对浏览器的检查工具不够了解

学习thinkphp遇到的问题

大多都是 Teacher notfound,这种问题在前期比较常见
图片描述

都是因为没有use Teacher
图片描述
只需要use app/common/model/Teacher

<?php
namespace app\index\controller;
use app\common\model\Klass;        
use think\Request;                   
use app\common\model\Teacher;    
   
class KlassController extends IndexController
{
    public function index()
    {
        $klasses = Klass::paginate();
        $this->assign('klasses', $klasses);
        return $this->fetch();
    }

就可以解决
图片描述

猜你喜欢

转载自www.cnblogs.com/baimeishaoxia/p/11815769.html