創建bootstrap項目_使用Bootstrap創建第一個網頁

創建bootstrap項目

使用Bootstrap創建第一個網頁 (Create First Webpage with Bootstrap)

In the previous article, we learned "how to setup bootstrap?" for a web project. If you haven’t gone through that, it is recommended to read it. Now, in this article, we will learn how to create the first responsive webpage using bootstrap? At any time, if you find any doubt just write it down in the comment section.

在上一篇文章中,我們為一個Web項目學習了“ 如何設置引導程序? ”。 如果您還沒有經歷過,建議閱讀。 現在,在本文中,我們將學習如何使用bootstrap創建第一個響應式網頁 ? 任何時候,如果您有任何疑問,請將其寫下來。

創建HTML文檔類型 (Create HTML doctype)

Always include html5 doctype from the beginning of the program. Also, include HTML starting and closing tag with lang attribute and set lang = "en". This ensures we are using the English language.

始終從程序開始處包含html5 doctype 。 另外,包括帶有lang屬性HTML開始和結束標記,并設置lang =“ en” 。 這樣可以確保我們使用英語。

Example:

例:

 <html lang="en">

HTML代碼 (HTML Code)

<!doctype html>
<html lang="en">
<head>
<title> Page Title </title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
< !- - Local file  - - > 
<link rel="stylesheet" href="Path\bootstrap\bootstrap-4.1.3-dist\css\bootstrap.min.css">
<script src="Path\bootstrap\bootstrap-4.1.3-dist\js\bootstrap.bundle.min.js"></script>
<!-- Online CDN -->
<link rel="stylesheet"href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body>
< !- - Do whatever you want to show on your display webpage. - - > 
</body>
</html>

Note: Please pay attention that we have both ways implemented into this HTML script. But, you can choose to go for either offline or online bootstrap file hosting, depending on your preference and requirement.

注意:請注意,我們在HTML腳本中同時實現了兩種方法。 但是,您可以根據自己的喜好和要求選擇脫機或在線引導文件托管。

Explanation:

說明:

  • The <title> and <meta> tags must be defined under the <head> tag. All of the tags, I mean the complete script must be enclosed within the <html> tag.

    <title>和<meta>標簽必須在<head>標簽下定義。 所有標記,我的意思是完整的腳本必須包含在<html>標記內。

  • Head tag:

    頭標簽:

    Head tag is used for heading.

    Head標簽用于標題。

    <title>, <meta>, <styles>, <scripts> tags and more are placed between the <head> tag. You cannot define more than one head tag in one document.

    <title> , <meta> , <styles> , <scripts>標記以及更多標記放置在<head>標記之間。 您不能在一個文檔中定義多個head標簽。

    Ex: <head> ... </head>

    例如: <head> ... </ head>

  • Title tag:

    標題標簽:

    Title tag is used under the tag for giving the title to our page or document. It displays title to our page and is shown in the title toolbar. We can use only one title name in one document.

    標題標簽用于在標簽下為頁面或文檔賦予標題。 它顯示了我們頁面的標題,并顯示在標題工具欄中。 我們只能在一個文檔中使用一個標題名稱。

    Ex: <title> page title </title>

    例如: <title>頁面標題</ title>

  • Meta tag:

    元標記:

    We have to know about metadata first for knowing more about the

    我們必須先了解元數據,才能進一步了解

    <meta> tag. Metadata means data about data i.e. short description about large data. Meta tag contains a short description of the current page.

    <meta>標簽。 元數據是指有關數據的數據,即有關大數據的簡短描述。 元標記包含當前頁面的簡短描述。

一些元數據標簽 (Some of the Metadata tags)

1) <meta charset="utf-8">

1) <meta charset =“ utf-8”>

It is used to define character set encoding for the current page. "utf-8" is the most commonly used character encoding, and supported by most of the web browsers.

它用于定義當前頁面的字符集編碼“ utf-8”是最常用的字符編碼,并且大多數Web瀏覽器都支持。

2) <meta name="description" content="about bootstrap tutorial">

2) <元名稱=“描述” content =“關于引導程序教程”>

It provides short description of current page.

它提供了當前頁面的簡短描述。

3) <meta name="keywords" content="bootstrap,html,css">

3) <元名稱=“關鍵字” content =“ bootstrap,html,css”>

It is useful for search engine optimization. You can pass keywords (e.g. bootstrap, html, css) that can be used to search your website through search engines.

這對于搜索引擎優化很有用。 您可以傳遞可用于通過搜索引擎搜索您的網站的關鍵字(例如,bootstrap,html,css)。

4) <meta name="viewport" content="width=device-width, initial-scale=1">

4) <meta name =“ viewport” content =“ width = device-width,initial-scale = 1”>

This tag is a key tag that is responsible for rendering responsive design as per device.

該標簽是一個關鍵標簽,負責按設備呈現響應設計。

Here,

這里,

  • width=device-width - It will set the width of the page according to the device width.

    width = device-width-它將根據設備寬度設置頁面的寬度。

  • initial-scale=1 - It sets initial zoom level when the page is first loaded.

    initial-scale = 1-設置首次加載頁面時的初始縮放級別。

Conclusion:

結論:

In this article, we have learned about how to create a simple bootstrap webpage structure? This was mostly based on setting up the initial page structure for Bootstrap. We will learn about "bootstrap Grid system" in the upcoming article. See you soon in the next article. Have a great day! Happy Learning!

在本文中,我們了解了如何創建簡單的引導程序網頁結構? 這主要是基于為Bootstrap設置初始頁面結構 。 在下一篇文章中,我們將學習“引導網格系統”。 下篇文章很快見。 祝你有美好的一天! 學習愉快!

翻譯自: https://www.includehelp.com/html/create-first-webpage-with-bootstrap.aspx

創建bootstrap項目

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/378037.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/378037.shtml
英文地址,請注明出處:http://en.pswp.cn/news/378037.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Chaikin Curve(球面插值)

在兩條折線間完成平滑的過渡是 用畫布做UI 或者做類似地圖編輯器一類的工作的 很常見的任務。 怎么樣化方為圓是決定工作效率的很重要的因素。&#xff08;當需要編輯的曲線多起來&#xff0c; 復雜起來的時候&#xff0c;這會是件相當繁重的工作&#xff09; 最容易想到的莫非…

【2020 電設G題 圖像題解】

博主聯系方式: QQ:1540984562 QQ交流群:892023501 群里會有往屆的smarters和電賽選手,群里也會不時分享一些有用的資料,有問題可以在群里多問問。 2022.3.10新增訂閱通知 近期把此專欄設置為了付費模式,可以直接花9.9買這個專欄,買了就可以直接這個專欄的所有文章了。后…

六、ROI和泛洪填充

一、ROI ROI&#xff1a;region of interest&#xff0c;即感興趣區域。 一般主要通過numpy來獲取ROI 將某區域轉變為灰色圖片再覆蓋原圖像 import cv2 import numpy as npsrc cv2.imread(r"G:\Juptyer_workspace\study\opencv\opencv3\a1.jpg") cv2.imshow(&quo…

VS2005 there is no source code available for the current location 解決方案

1.首先試最常規的方法&#xff1a;Clean and then rebuild solution&#xff0c;但是沒有解決 2.進入Tools>Options,選擇Debugging>General 卻掉 Enable address-level debugging 選項&#xff0c;在去掉 Require source files to exactly match the original version. O…

django 靜態數據_如何在Django中使用靜態數據?

django 靜態數據Static Data means those data items that we cannot want to change, we want to use them as it is like audio, video, images, files etc. 靜態數據是指我們不想更改的數據項&#xff0c;我們想像音頻&#xff0c;視頻&#xff0c;圖像&#xff0c;文件等那…

Leetcode226. 翻轉二叉樹(遞歸、迭代、層序三種解法)

目錄題目1、層序法&#xff1a;2、遞歸法&#xff1a;1、先序遍歷&#xff08;中左右&#xff09;2、后序遍歷&#xff08;左右中&#xff09;3、遞歸中序遍歷為什么不行&#xff08;左中右&#xff09;3、迭代法&#xff1a;1、先序遍歷2、中序遍歷3、后序遍歷為什么迭代法的中…

Asp.net 獲取當前目錄的三種方法

方法一&#xff1a; string sPath System.IO.Path.GetDirectoryName(Page.Request.PhysicalPath) 方法二&#xff1a; string sPath System.Web.HttpContext.Current.Request.MapPath("/") 方法三&#xff1a; string s…

一款jQuery立體感動態下拉導航菜單特效

一款jQuery立體感動態下拉導航菜單特效,鼠標經過&#xff0c;在菜單欄上方下拉出一個背景圖片&#xff0c;效果十分不錯的一款jquery特效。 對IE6都是兼容的&#xff0c;希望大家好好研究研究。 適用瀏覽器&#xff1a;IE6、IE7、IE8、360、FireFox、Chrome、Safari、Opera、傲…

七、模糊操作

一、模糊操作基本原理 1&#xff0c;基于離散卷積 2&#xff0c;定義好每一個卷積核 3&#xff0c;不同卷積核得到不同的卷積效果 4&#xff0c;模糊是卷積的一種表象 二、1*3卷積核舉例 每次右移一格&#xff0c;進行對應相乘再求和。1*3的卷積核左右兩邊的元素并沒有處理而…

LeetCode 100. 相同的樹 思考分析

給定兩個二叉樹&#xff0c;編寫一個函數來檢驗它們是否相同。 如果兩個樹在結構上相同&#xff0c;并且節點具有相同的值&#xff0c;則認為它們是相同的。 示例 1: 輸入: 1 1 / \ / 2 3 2 3 [1,2,3], [1,2,3]輸出: true 示例 2: 輸入: 1 1 / 2 2 [1,2], [1,null,2]輸…

在Python中以二進制格式輸入數字

Syntax to convert binary value to an integer (decimal format), 將二進制值轉換為整數(十進制格式)的語法&#xff0c; int(bin_value, 2)Here, 這里&#xff0c; bin_value should contain the valid binary value bin_value應該包含有效的二進制值 2 is the base value …

八、邊緣保留濾波(EPF)

一、概念 邊緣保留濾波(EPF,edge preserving filtering) 二、高斯雙邊 cv2.bilateralFilter(image,0,100,15)100為差異&#xff0c;15為周圍的區域 import cv2 import numpy as npdef bilateralFilter(image):dst cv2.bilateralFilter(image,0,100,15)cv2.imshow(bilater…

LintCode 375. 克隆二叉樹(深復制)

先序遍歷構造二叉樹 TreeNode * preorder(TreeNode * root){if(rootNULL) return NULL;TreeNode * ans;ansnew TreeNode(root->val);if(root->left!NULL){ans->leftpreorder(root->left);}if(root->right!NULL){ans->rightpreorder(root->right);}return…

關于ECMAScript基礎入門的分享

目錄 ECMAScript基礎入門1. 介紹2. 變量與數據類型2.1 變量2.2 數據類型 3. 運算符3.1 算術運算符3.2 比較運算符 4. 控制流4.1 條件語句4.2 循環語句 5. 函數6. 對象與數組6.1 對象6.2 數組 7. 總結 ECMAScript基礎入門 1. 介紹 ECMAScript是JavaScript的標準規范&#xff0…

kotlin 計算平方_Kotlin程序來計算復利

kotlin 計算平方Compound interest is the sum of principal amount and interest of interest. 復利是本金和利息之和。 Given, principal, rate, and time, we have to calculate the Compound interest. 給定本金&#xff0c;利率和時間&#xff0c;我們必須計算復利。 Fo…

近代科學為什么誕生在西方-1

寬泛的講&#xff0c;近代科學是幾種文明在長達幾個世紀的持續交流碰撞中產生的。它正在日益成為全世界全人類都有效的普適科學。通向現代科學之路就是通向自由和開放交流之路。 馬克思韋伯和莫頓都認為&#xff0c;科學事業要持續的進步就要特定的文化和制度的支持。 中國的數…

九、圖像直方圖

一、圖像直方圖的屬性 說白了就是將圖像上的各個顏色通道上的像素點的像素值進行統計&#xff0c;例如&#xff1a;像素值為14的像素點個數有幾個&#xff0c;進行顯示。 圖像的像素值取值范圍為[0,255]&#xff0c;這個范圍也成為直方圖的range也就是直方圖的橫坐標軸 每一個…

BIFR的完整形式是什么?

BIFR&#xff1a;工業和金融重組委員會 (BIFR: Board of Industrial and Financial Reconstruction) BIFR is an abbreviation of the Board of Industrial and Financial Reconstruction. It was an organization of the Government of India and a branch of the Department …

LeetCode 101. 對稱二叉樹 思考分析

題目 給定一個二叉樹&#xff0c;檢查它是否是鏡像對稱的。 例如&#xff0c;二叉樹 [1,2,2,3,4,4,3] 是對稱的。 1/ 2 2 / \ / 3 4 4 3 但是下面這個 [1,2,2,null,3,null,3] 則不是鏡像對稱的: 1/ 2 2 \ 3 3 進階&#xff1a; 你可以運用遞歸和迭代兩種方法解決這個…

內心能不能寧靜一點,做事能不能堅持一下

內心能不能寧靜一點&#xff0c;做事能不能堅持一下 每次朋友問我怎么樣&#xff0c;我總感覺不好回答&#xff0c;如果說實話我想他們或許是不能理解我的處境的&#xff0c;只能報以“還好”之類的語言&#xff0c;糊弄一下。唯一一次說了實話是&#xff1a;我墜落了&#xff…