其他一些零碎知识

在css中画圆,例如:
<style type="text/css">
div{
width: 200px;
height: 200px;
background-color: #000;
/*border-top-left-radius: 100px;
border-bottom-left-radius: 100px;
border-top-right-radius: 100px;
border-bottom-right-radius: 100px;*/
border-radius: 100px;
}
</style>




在css中画三角形,例如:
<style type="text/css">
*{
margin: 0;
padding: 0;
}
div{
width: 0px;
height: 0px;
/*border-width: 100px;*/
border-left-color:transparent;
border-right-color: transparent;
border-top-color: transparent;
border-bottom-color: red;
border-width: 100px;
border-style: solid;
margin-top:-100px;
}
</style>


logo的设置
给定一个div.添加背景图片,并将a标签中的文字进行缩进(text-indent:-9999px;)


版心
/*版心*/
.w{
width:980px ;
margin:0 auto;
/*border:1px solid;*/
}

精灵图
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>精灵图讲解</title>
<style type="text/css">
div{
width: 24px;
height: 22px;
background-image: url(images/fly.png);
background-position: 0 -102px;
/*
1 左右
2 上下
*/
}
</style>
</head>
<body>
<!-- 精灵图的优点
将多个小图片在同一个图片上显示,加快的图片的加载效率,减少了占用的空间和内存
-->
<div></div>
</body>
</html>
V的制作
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>xiaojian</title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
i,s{
text-decoration: none;
font-style: normal;
}
i{
display: inline-block;
width: 16px;
height: 8px;
/*border: 1px solid red;*/
overflow: hidden;
position: relative;
overflow: hidden;
}
s{
position: absolute;
top: -11px;
}
</style>
</head>
<body>
<i>
<s>◇</s>
</i>
</body>
</html>
写网页的注意点:
1.  固定的文件夹存放网页的位置
2.  必备:效果图,存放图片的文件夹,存放 css 的文件夹
3.  创建 base.css 文件
a) css 初始化  
i.  目的:清空某些标签默认的一些属性
ii.  初始化的代码示例 :*{margin:0;padding:0}
iii.  注意:不建议使用 * ,建议换为 :div,p,h1,h2,h3,h4,h5,h6,ul,ol,dl,li,dd,dt
b)  页面的公共代码 base
4.  创建主页面 (index.html) 或者登陆( login.html ),注册页面( r egister .html
5.  在当前页面中导入 base.css 文件
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值