zoukankan      html  css  js  c++  java
  • 网站根目录的问题

       今天在做学习挑战杯的项目的时候,侧边的Layout图片始终出不来,晚上看了好久才发现是最基础的根目录的问题,在vs里面操作之前是直接把图片拉出来,这样子图片就可以直接显示了,但是今天不行。很纳闷呀。

    image就是这样的显示不出来。

    代码如下:

                <a target="_blank" title="新浪微博" href="http://weibo.com/5369904897/">
                    <img style=" 20%;max- 36px;" src="~/Content/Web/images/sina.png" alt="新浪微博" />
                </a>
                <a target="_blank" title="腾讯微博" href="http://t.qq.com/huolongji?preview">
                    <img style=" 20%;max- 36px;display: inline-block;" src="~/Content/Web/images/qq.png" alt="腾讯微博" />
                </a>
                <a target="_blank" class="home-renren" title="人人网" href="http://www.renren.com/600991382">
                    <img style=" 20%;max- 36px;display: inline-block;" src="~/Content/Web/images/rr.png" alt="人人网" />
                </a>
                <a style="margin-right: 0;" target="_blank" class="home-linkin" title="LinkedIn" href="http://cn.linkedin.com/pub/bio-discover/38/4b6/a27">
                    <img style=" 20%;max- 36px;display: inline-block;" 
                         src="~/Content/Web/images/in.png" alt="LinkedIn" />
                </a>

    这里是图片路径的问题,这样修改下就可以了

                <a target="_blank" title="新浪微博" href="http://weibo.com/5369904897/">
                    <img style=" 20%;max- 36px;" src="/Content/Web/images/sina.png" alt="新浪微博" />
                </a>

    这就是很明显的网站目录理解有问题。image

    1:可以看下面整个项目的目录结构。

    image

    红色:这个是网站的根目录,也就是相当于我们本地站点http://localhost:2151/这个路径就可以到达这个路径了。

    黑色:一级目录;

    Fonts:二级目录;

    我们一般的/就是向上面返回一层。这样就到了上一层的目录了。

  • 相关阅读:
    百度之星资格赛1001——找规律——大搬家
    HDU1025——LIS——Constructing Roads In JGShining's Kingdom
    DP(递归打印路径) UVA 662 Fast Food
    递推DP UVA 607 Scheduling Lectures
    递推DP UVA 590 Always on the run
    递推DP UVA 473 Raucous Rockers
    博弈 HDOJ 4371 Alice and Bob
    DFS(深度) hihoCoder挑战赛14 B 赛车
    Codeforces Round #318 [RussianCodeCup Thanks-Round] (Div. 2)
    DP(DAG) UVA 437 The Tower of Babylon
  • 原文地址:https://www.cnblogs.com/netxiaohui/p/5289621.html
Copyright © 2011-2022 走看看