找回密码
 立即注册

推荐阅读

  • 便民服务
  • 关注我们
  • 社区新手
新建项目:Ctrl+N再按住W
新建HTML文件:Ctrl+N再按住H
Ctrl+S保存
CtrI+R在浏览器中打开
编辑界面输入! +tab键联想出html页面的基本结构
标题标签  <h1>...<h1/> .......<h6><h6/>
段落标签  <p>...<p/>   
em,i表示斜体
图片标签<img src=""/ >
链接标签 <a href=" 网址"> </a>   
新开窗口 target="_black"  
死链接加 #列表标签  
有序列表<ol><li>...</li> </ol>   
无序列表 <ul><li>...</li></ul>
表格标签  <table border="" cellspacing="" cellpadding="">                       
<tr><th>Header</th></tr>                       
<tr><td>Data</td></tr>               
</table>                    
border:边距
cellspacing:单元格与单元格的距离
cellpadding:单元格与内容之间的距离
align:center表格居中
<td>左对齐文本
tr 行   
td 列
快捷键:table>tr*3>td*2 +tab键
colspan="":合并几列   
rowspan="":合并几行
表单标签:<form><form/>  <input type="..." name="" id="" value="" />
用户名格式:text
密码格式:password
性别格式:radio  
checked表示默认值
复选框:checkbox   
文本框:textarea
选择框:select      


按   钮:button
提   交:submit      
重  置:reset
上传文件:file
div 也是一种标签;分区管理


CSS层叠样式表层叠的样式表基本格式
1、在标签属性中加style属性
例:<p style="color: firebrick;">duoceshi</p>
2、在head里面加style样式  
例  <style type="text/css">                                                      p{                                                            color: palevioletred;                                                         }                                                </style>
3、通过外链接的方式  例:<link rel="stylesheet" type="text/css" href="css/text.css"/>

id选择器  
id所对应的值前面加#<style type="text/css">     
#one{            
color: darkgreen;           
     }
</style>
class选择器
class对应的值前面要加 .<style type="text/css">                     
   .one,.two{color: darkmagenta;}              </style>

组合选择器:

伪类选择器<style type="text/css">                     
  p{                              
  color: green;                 
               }                     
  p:hover{                          
      color: darkorange;   /*放置鼠标颜色会发生改变*/               
        }
字体和文本样式
<style type= "text/css">
em {         
font-size: 50px; 字体大小     
font-family: "微软雅黑"; 字体         
font-style: italic; 斜体      
font- weight: bold 加粗        
text-decoration: underline; 下划线      
text-align: center;     文本内容居中          cursor: pointer;  实现鼠标移动到具体内容 上鼠标形状变为手状




分享至 : QQ空间
收藏

0 个回复

您需要登录后才可以回帖 登录 | 立即注册