Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537
tml 代碼
<template>
<div class="index-top flex flex-ac flex-jsb" :style="pstyle">
<van-image :src="logoUrl" />
<van-icon name="manager-o" @click="onClickUser" />
</div>
</template>
js 代碼
TML 背景
設(shè)置背景顏色<body bgcolor="#000000">
設(shè)置背景圖片<body background="bg.jpg">
設(shè)置頁(yè)面文字顏色<body text="#cccccc">
顏色屬性值有三種值的格式
1,英文單詞,比如 red , yellow ,green …
<body bgcolor="yellow">
2, 十六進(jìn)制表示方式,#開頭,6個(gè)十六進(jìn)制的字符或數(shù)字 組合
比如:#FFFFFF,#000000,#CCCAAA,#22BCAD
十六進(jìn)制: 0-9 和 a-f
3, RGB模式,紅 0-255,綠 0-255,藍(lán) 0-255
比如: RGB(120,33,234)
HTML 表單
表單是一個(gè)包含表單元素的區(qū)域。
表單能夠包含 input 元素,textarea、select、fieldset、legend 和 label 元素。
表單使用標(biāo)簽(<form>)定義。
表單用于向服務(wù)器傳輸數(shù)據(jù)。
表單的結(jié)構(gòu)
<form name="form1" action="URL" method="get">
用戶名:<input type="text" name="uname" />
密 碼:<input type="password" name="passwd" />
</form>
屬性說(shuō)明
name表單的名稱
action表單提交地址
method表單數(shù)據(jù)提交的方式 (get ,post)
enctypeMIME類型
target打開方式
input標(biāo)簽
屬性說(shuō)明
typeinput元素類型
nameinput 元素的名稱
valueinput 元素的值
sizeinput 元素的寬度
readonly是否只讀
maxlength輸入字符的最大長(zhǎng)度
disabled是否禁用
1.文本框
<input type="text" name="username" value="" />
2.密碼框
<input type="password" name="passwd"/>
3.單選按鈕
<input type="radio" name="sex"value="1"checked="checked" />男
<input type="radio" name="sex"value="0"/>女
4.復(fù)選框
<input type="radio" name="sex"value="1"checked="checked" />男
<input type="radio" name="sex"value="0"/>女
<input type="checkbox"name="love"value="music" checked="checked"/> 聽音樂
<input type="checkbox"name="love" value="movie"/> 看電影
<input type="checkbox"name="love" value="game"/> 玩游戲
5.按鈕
<input type="button" name="btn" value="確定"/>
<input type="submit" name="comit" value="提交"/>
<input type="reset" name="reset" value="重寫"/>
<input type="image" name="img_btn" src="btn.gif"/>
6. 隱藏域
隱藏域用于在程序發(fā)送沒有必要讓用戶看到特定值的時(shí)候使用。
<input type="hidden" name="uid" value="10"/>
7. 上傳文件
<input type="file" name="photo"/>
注:利用這項(xiàng)功能時(shí),在 form 標(biāo)簽中要指定method屬性。要把method 指定為post, enctype屬性指定為 multipart/form-data。
<textarea> 多行文本框
<textarea name="content" rows="5" cols="50"> </textarea>
屬性說(shuō)明
name元素的名稱
rows指定文本框的高度
cols指定文本框的寬度
select下拉列表框
<select name="city">
<option value="0">請(qǐng)選擇</option
<option value="bj">北京</option>
<option value="gz">廣州</option>
</select>
屬性說(shuō)明
name下拉列表框的名稱
size下拉列表框的顯示行數(shù)
multiple是否多選
disabled是否禁用
selected設(shè)置默認(rèn)選中的選項(xiàng)
value選項(xiàng)的值
optgroup標(biāo)簽
optgroup 元素用于組合選項(xiàng) 。
屬性說(shuō)明
label指定組合選項(xiàng)名稱
fieldset標(biāo)簽
fieldset 標(biāo)簽作用是把表單中元素組合起來(lái)
<fieldset>
<legend></legend> length為字符長(zhǎng)度
<form></form>
</fieldset>
label標(biāo)簽
lable 標(biāo)簽的作用是將輸入項(xiàng)或選項(xiàng)及其標(biāo)簽文字關(guān)聯(lián)起來(lái)。
<input type="radio" name="sex" value="1" id="male" />
<label for="male">男</label>
<input type="radio" name="sex" value="0" id="female" />
<label for="female">女</label>
海無(wú)涯,不要沉浸在知識(shí)的海洋里,迷失自己。
要知道自己想要什么,抓住重點(diǎn),不忘初心。
這個(gè)世界上百分之20的人,掌握著百分之80的財(cái)富。
接下來(lái)一系列教程,就帶領(lǐng)大家抓住重點(diǎn),一起做那百分之20的人。
往期知識(shí)點(diǎn)回顧:
重點(diǎn)屬性-display
重點(diǎn)屬性-position
重點(diǎn)屬性-float
重點(diǎn)屬性-flex
重點(diǎn)屬性-overflow
重點(diǎn)屬性-media
CSS 背景這里指通過(guò)background對(duì)對(duì)象設(shè)置背景屬性,如通過(guò)CSS設(shè)置背景各種樣式。
設(shè)置顏色作為對(duì)象背景顏色
設(shè)置圖片作為背景圖片
設(shè)置背景平鋪重復(fù)方向
設(shè)置或檢索背景圖像是隨對(duì)象內(nèi)容滾動(dòng)還是固定的。
設(shè)置或檢索對(duì)象的背景圖像位置。
背景樣式的值是復(fù)合屬性值組合,也就是背景單詞的值可以跟多個(gè)屬性值,值與值之間使用一個(gè)空格間隔鏈接上即可。
1、設(shè)置純色背景。背景background可以設(shè)置對(duì)象純色的背景顏色,
2、設(shè)置圖為背景。可以設(shè)置對(duì)象背景為圖片,如果背景是圖片可以讓圖片重復(fù)平鋪橫鋪,或?qū)D片作為對(duì)象背景固定在對(duì)象任何位置。
屬性解析
no-repeat:不重復(fù)
repeat-x:水平方向(橫向)重復(fù)平鋪
repeat-y:垂直方向(豎向)重復(fù)平鋪
如果不設(shè)置,為全背景平鋪
left 圖片靠左
right 圖片靠右
top 圖片靠上
bottom 圖片靠下
fixed 圖片固定
scroll 背景圖片內(nèi)容滾動(dòng)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>flex布局css</title>
<style>
.container{
background: #FFF url(https://image.baidu.com/beijing.gif) no-repeat 0 0 fixed
}
</style>
</head>
<body>
<div class="container">
背景圖
</div>
</body>
</html>
復(fù)制代碼
1、由使用float浮動(dòng)造成浮動(dòng)產(chǎn)生無(wú)法顯示css背景顏色
2、高度不夠而產(chǎn)生背景無(wú)法顯示
3.如果是float造成:解決方法有三種,一個(gè)是設(shè)置clear清除浮動(dòng)、設(shè)置css高度、設(shè)置css overflow樣式。
4.如果是高度原因:解決方案如下,設(shè)置夠高的高度,或取消刪除高度樣式即可。
*請(qǐng)認(rèn)真填寫需求信息,我們會(huì)在24小時(shí)內(nèi)與您取得聯(lián)系。