css代码添加背景照片常用代码
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1 背景颜色 {bac<span style="color: black;">公斤</span>round-color:数值}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 2<a style="color: black;">背景<span style="color: black;">照片</span></a>{bac<span style="color: black;">公斤</span>round-image: url(url)|none}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 3 背景重复 {bac<span style="color: black;">公斤</span>round-repeat:inherit|no-repeat|repeat|repeat-x|repeat-y}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">4 背景固定 {bac<span style="color: black;">公斤</span>round-attachment:fixed|scroll}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 5 背景定位 {bac<span style="color: black;">公斤</span>round-position:数值|top|bottom|left|right|center}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 6 背影样式 {bac<span style="color: black;">公斤</span>round:背景颜色|背景图象|背景重复|背景附件|背景位置}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.背景颜色:bac<span style="color: black;">公斤</span>round-color</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 语法:{bac<span style="color: black;">公斤</span>round-color:数值}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 说明:参数取值和颜色属性<span style="color: black;">同样</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">重视</span>:在html<span style="color: black;">其中</span>,要为某个对象加上背景色<span style="color: black;">仅有</span>一种办法,那<span style="color: black;">便是</span>先做一个表格,在表格中设置完背景色,再把对象放进单元格。<span style="color: black;">这般</span>做比较麻烦,<span style="color: black;">不仅</span>代码较多,还要为表格的<span style="color: black;">体积</span>和定位伤些脑筋。<span style="color: black;">此刻</span>用css就<span style="color: black;">能够</span><span style="color: black;">容易</span>地直接搞定了,<span style="color: black;">况且</span>对象的范围很广,<span style="color: black;">能够</span>是一段文字,<span style="color: black;">亦</span><span style="color: black;">能够</span>只是一个单词或一个字母。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 例子:给部分文字加背景颜色给部分文字加背景颜色</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 表格背影颜色:style="bac<span style="color: black;">公斤</span>round-color:red"</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 2.<a style="color: black;">背景<span style="color: black;">照片</span></a>:bac<span style="color: black;">公斤</span>round-image</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">语法:{bac<span style="color: black;">公斤</span>round-image: url(url)|none}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 说明: url<span style="color: black;">便是</span>背景<span style="color: black;">照片</span>的存放路径。<span style="color: black;">倘若</span>用“none”来代替背景<span style="color: black;">照片</span>的存放路径,将什么<span style="color: black;">亦</span>不<span style="color: black;">表示</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 例子:给部分文字加背景<span style="color: black;">照片</span> .imgbgstyle { bac<span style="color: black;">公斤</span>round-image: url(logo.gif)}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 3.背景重复:bac<span style="color: black;">公斤</span>round-repeat</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">语法:{bac<span style="color: black;">公斤</span>round-repeat:inherit|no-repeat|repeat|repeat-x|repeat-y}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> <span style="color: black;">功效</span>:背景<span style="color: black;">照片</span><a style="color: black;">重复<span style="color: black;">掌控</span></a>的是背景<span style="color: black;">照片</span>平铺与否,<span style="color: black;">亦</span><span style="color: black;">便是</span>说,结合背景定位的<span style="color: black;">掌控</span><span style="color: black;">能够</span>在网页上的某处单独<span style="color: black;">表示</span>一幅背景<span style="color: black;">照片</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 说明:参数取值范围:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·inherit 继承</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·no-repeat 不重复平铺背景<span style="color: black;">照片</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">·repeat</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·repeat-x 使<span style="color: black;">照片</span><span style="color: black;">仅在</span>水平方向上平铺</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·repeat-y 使<span style="color: black;">照片</span><span style="color: black;">仅在</span>垂直方向上平铺</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> <span style="color: black;">重视</span>:<span style="color: black;">倘若</span>不指定背景<span style="color: black;">照片</span>重复属性,浏览器默认的是背景<span style="color: black;">照片</span>向水平、垂直两个方向上平铺。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 4.背景固定:bac<span style="color: black;">公斤</span>round-attachment</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">语法:{bac<span style="color: black;">公斤</span>round-attachment:fixed|scroll}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 说明:参数取值范围</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·fixed:网页滚动时,背景<span style="color: black;">照片</span>相<span style="color: black;">针对</span>浏览器的窗口而言,固定不动</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·scroll:网页滚动时,背景<span style="color: black;">照片</span>相<span style="color: black;">针对</span>浏览器的窗口而言,<span style="color: black;">一块</span>滚动</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">重视</span>:背景<span style="color: black;">照片</span>固定<span style="color: black;">掌控</span>背景<span style="color: black;">照片</span><span style="color: black;">是不是</span>随网页的滚动而滚动。<span style="color: black;">倘若</span>不设置背景<span style="color: black;">照片</span>固定属性,浏览器默认背景<span style="color: black;">照片</span>随网页的滚动而滚动。为了避免过于花哨的背景<span style="color: black;">照片</span>在滚动时<span style="color: black;">损伤</span>浏览者的视力,<span style="color: black;">因此</span><span style="color: black;">能够</span>解除背景<span style="color: black;">照片</span>和文字内容的<span style="color: black;">绑缚</span>,该为和浏览器窗口<span style="color: black;">绑缚</span>。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 例子:使背景图案不随文字“滚动”的css</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">body { bac<span style="color: black;">公斤</span>round: purple url(bg.jpg); bac<span style="color: black;">公斤</span>round-repeat:repeat-y; bac<span style="color: black;">公斤</span>round-attachment:fixed }</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 5.背景定位:bac<span style="color: black;">公斤</span>round-position</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 语法:{bac<span style="color: black;">公斤</span>round-position:数值|top|bottom|left|right|center}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> <span style="color: black;">功效</span>:背景定位用于<span style="color: black;">掌控</span>背景<span style="color: black;">照片</span>在网页中<span style="color: black;">表示</span>的位置。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> 说明:参数取值范围</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·带长度单位的数字参数</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">·top:相对前景对象顶对齐</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·bottom:相对前景对象底对齐</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·left:相对前景对象左对齐</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·right:相对前景对象右对齐</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·center:相对前景对象中心对齐</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> ·比例关系</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> <span style="color: black;">重要</span>字解释如下:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"> top left = left top = 0% 0%</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">top = top center = center top = 50</p>
对于这个问题,我有不同的看法... 在遇到你之前,我对人世间是否有真正的圣人是怀疑的。 你的话深深触动了我,仿佛说出了我心里的声音。
页:
[1]