博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
css06背景图片
阅读量:7048 次
发布时间:2019-06-28

本文共 1458 字,大约阅读时间需要 4 分钟。

    

 商品分类

01.创建一个html页面

02.创建对应的demo1.css文件

*{
margin: 0px; /*设置网页中所有的元素 外边距为0*/}#nav{
width: 230px; /*最大的div宽度*/}.title{
height: 30px; /*div的高度*/ line-height: 30px;/*内容的行高*/ color: white; /*字体颜色*/ background:red url("../image/arrow-down.gif") 210px no-repeat; /*背景*/ cursor: move; /*控制鼠标的形状为 可移动状态*/}ul{
background-color: #D7D7D7; /*背景颜色*/}a{
text-decoration: none; /*去掉超链接默认的下划线*/}li{
background-image: url("../image/arrow-right.gif") ; /*背景图片*/ background-repeat: no-repeat; /*背景图片的填充方式*/ background-position: 173px; /*背景图片的位置*/ line-height: 30px; /*内容的行高*/ /*list-style-image: url("../image/arrow-down.gif"); 设置列表的标志图片*/ /* list-style-type: decimal-leading-zero; 设置列表的标志类型*/ /* list-style: decimal url("../image/arrow-down.gif") ; 类型和图片同时存在 取图片*/ list-style: none; /*去除标记*/}/* 超链接的伪类*//*a:link{ 未访问的链接 color:red;}*//*a:visited{ 已经访问的链接 color:darkcyan;}*/a:hover{
/* 鼠标悬停的链接*/ color:red; text-decoration: underline;/*给超链接增加下划线*/}/*a:active{ 点或者是被选中的链接 color:yellow;}*/

03.效果图

 

 

 

    
对背景图片的大小进行设置

 

转载于:https://www.cnblogs.com/xtdxs/p/7094152.html

你可能感兴趣的文章
观察者模式
查看>>
【转】PHP中的Hash算法
查看>>
SqlLite的工具类SQLiteOpenHelper
查看>>
chgrp chown chmod
查看>>
nodejs中安装express
查看>>
2014软件表
查看>>
Struts2教程3:struts.xml常用配置解析
查看>>
(转帖)Implementing custom JavaFx Bindings
查看>>
mysql外键
查看>>
转发和重定向的区别
查看>>
<ecmall> ECMall的MySQL数据库调用
查看>>
SugarCRM - 如何修改默认首页
查看>>
Java日期类总结
查看>>
开关标识一个是0一个是-那个是开哪个是关
查看>>
ruby的并发和并行
查看>>
朱晶晶-六步制定好企业移动化战略
查看>>
SVPullToRefresh
查看>>
SSIndicatorLabel
查看>>
ASFBPostController
查看>>
Android实战技巧:Handler
查看>>