zoukankan      html  css  js  c++  java
  • link元素 rel src href属性

    The SRC and HREF attributes are used to include some external entities like an image, a CSS file, a HTML file, any other web page or a JavaScript file.

    Is there a clear differentiation between SRC and HREF? Where or when to use SRC or HREF?  I think they can't be used interchangeably

    • To refer a CSS file: href="cssfile.css" inside the link tag.
    • To refer a JS file: src="myscript.js" inside the script tag.
    • To refer an image file: src="mypic.jpg" inside an image tag.
    • To refer another webpage: href="http://www.webpage.com" inside an anchor tag.

    rel 属性规定当前文档与被链接文档之间的关系。

    只有 rel 属性的 "stylesheet" 值(文档的外部样式表)得到了所有浏览器的支持。其他值只得到了部分地支持。

    <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"/>

    <script type="text/javascript" src="js/jquery.inview.min.js"></script>

  • 相关阅读:
    立体图
    旅行家的预算
    洛谷P多米诺骨牌
    洛谷P2331最大子矩阵
    理想的正方形
    2015 ACM/ICPC Asia Regional Hefei Online Find a path
    Atcoder abc 138 F
    Atcoder abc 138 E String of Impurity
    zlb的8.19考试
    Atcoder abc 138
  • 原文地址:https://www.cnblogs.com/Yogurshine/p/6861758.html
Copyright © 2011-2022 走看看