当前位置: 首页 > news >正文

aspx网站做app品牌互动营销案例

aspx网站做app,品牌互动营销案例,小榄网站建设推广,盐田做网站css 的介绍 学习目标 能够知道css的作用 1. css 的定义 css(Cascading Style Sheet)层叠样式表,它是用来美化页面的一种语言。 没有使用css的效果图 使用css的效果图 2. css 的作用 美化界面, 比如: 设置标签文字大小、颜色、字体加粗等样式。 控制页面布局, 比如…

css 的介绍

学习目标

  • 能够知道css的作用


1. css 的定义

css(Cascading Style Sheet)层叠样式表,它是用来美化页面的一种语言。

没有使用css的效果图

使用css的效果图

2. css 的作用

  1. 美化界面, 比如: 设置标签文字大小、颜色、字体加粗等样式。

  2. 控制页面布局, 比如: 设置浮动、定位等样式。

3. css 的基本语法

选择器{

样式规则

}

样式规则:

属性名1:属性值1;

属性名2:属性值2;

属性名3:属性值3;

...

选择器:是用来选择标签的,选出来以后给标签加样式。

代码示例:

div{ width:100px; height:100px; background:gold; 
}

说明

css 是由两个主要的部分构成:选择器和一条或多条样式规则,注意:样式规则需要放到大括号里面。

4. 小结

  • css 是层叠样式表,它是用来美化网页和控制页面布局的。

  • 定义 css 的语法格式是: 选择器{样式规则}

css 的引入方式

学习目标

  • 能够知道 css 的引入三种方式


css的三种引入方式

  1. 行内式

  2. 内嵌式(内部样式)

  3. 外链式

1. 行内式

直接在标签的 style 属性中添加 css 样式

示例代码:

<div style="width:100px; height:100px; background:red ">hello</div>

优点:方便、直观。 缺点:缺乏可重用性。

2. 内嵌式(内部样式)

<head>标签内加入<style>标签,在<style>标签中编写css代码。

示例代码:

<head><style type="text/css">h3{color:red;}</style>
</head>

优点:在同一个页面内部便于复用和维护。 缺点:在多个页面之间的可重用性不够高。

3. 外链式

将css代码写在一个单独的.css文件中,在<head>标签中使用<link>标签直接引入该文件到页面中。

示例代码:

<link rel="stylesheet" type="text/css" href="css/main.css">

优点:使得css样式与html页面分离,便于整个页面系统的规划和维护,可重用性高。 缺点:css代码由于分离到单独的css文件,容易出现css代码过于集中,若维护不当则极容易造成混乱。

4. css引入方式选择

  1. 行内式几乎不用

  2. 内嵌式在学习css样式的阶段使用

  3. 外链式在公司开发的阶段使用,可以对 css 样式和 html 页面分别进行开发。

5. 小结

  • css 的引入有三种方式, 分别是行内式、内嵌式、外链式。

  • 外链式是在公司开发的时候会使用,最能体现 div+css 的标签内容与显示样式分离的思想, 也最易改版维护,代码看起来也是最美观的一种。

css 选择器

学习目标

  • 能够说出 css 选择器的种类


1. css 选择器的定义

css 选择器是用来选择标签的,选出来以后给标签加样式。

2. css 选择器的种类

  1. 标签选择器

  2. 类选择器

  3. 层级选择器(后代选择器)

  4. id选择器

  5. 组选择器

  6. 伪类选择器

3. 标签选择器

根据标签来选择标签,以标签开头,此种选择器影响范围大,一般用来做一些通用设置。

示例代码

<style type="text/css">p{color: red;}
</style>
​
<div>hello</div>
<p>hello</p>

4. 类选择器

根据类名来选择标签,以 . 开头, 一个类选择器可应用于多个标签上,一个标签上也可以使用多个类选择器,多个类选择器需要使用空格分割,应用灵活,可复用,是css中应用最多的一种选择器。

示例代码

<style type="text/css">.blue{color:blue}.big{font-size:20px}.box{width:100px;height:100px;background:gold} 
</style>
​
<div class="blue">这是一个div</div>
<h3 class="blue big box">这是一个标题</h3>
<p class="blue box">这是一个段落</p>

5. 层级选择器(后代选择器)

根据层级关系选择后代标签,以选择器1 选择器2开头,主要应用在标签嵌套的结构中,减少命名。

示例代码

<style type="text/css">div p{color: red;}.con{width:300px;height:80px;background:green}.con span{color:red}.con .pink{color:pink}.con .gold{color:gold}    
</style>
​
<div><p>hello</p>
</div>
​
<div class="con"><span>哈哈</span><a href="#" class="pink">百度</a><a href="#" class="gold">谷歌</a>
</div>
<span>你好</span>
<a href="#" class="pink">新浪</a>

注意点: 这个层级关系不一定是父子关系,也有可能是祖孙关系,只要有后代关系都适用于这个层级选择器

6. id选择器

根据id选择标签,以#开头, 元素的id名称不能重复,所以id选择器只能对应于页面上一个元素,不能复用,id名一般给程序使用,所以不推荐使用id作为选择器。

示例代码

<style type="text/css">#box{color:red} 
</style>
​
<p id="box">这是一个段落标签</p>   <!-- 对应以上一条样式,其它元素不允许应用此样式 -->
<p>这是第二个段落标签</p> <!-- 无法应用以上样式,每个标签只能有唯一的id名 -->
<p>这是第三个段落标签</p> <!-- 无法应用以上样式,每个标签只能有唯一的id名  -->

注意点: 虽然给其它标签设置id=“box”也可以设置样式,但是不推荐这样做,因为id是唯一的,以后js通过id只能获取一个唯一的标签对象。

7. 组选择器

根据组合的选择器选择不同的标签,以 , 分割开, 如果有公共的样式设置,可以使用组选择器。

示例代码

<style type="text/css">/* 定义公共属性 */.box1,.box2,.box3{width:100px;height:100px}/* 定义个性 */.box1{background:red}.box2{background:pink}.box2{background:gold}
</style>
​
<div class="box1">这是第一个div</div>
<div class="box2">这是第二个div</div>
<div class="box3">这是第三个div</div>

8. 伪类选择器

用于向选择器添加特殊的效果, 以 : 分割开, 当用户和网站交互的时候改变显示效果可以使用伪类选择器

示例代码

<style type="text/css">.box1{width:100px;height:100px;background:gold;}.box1:hover{width:300px;}
</style>
​
<div class="box1">这是第一个div</div>

9. 小结

  • css 选择器就是用来选择标签设置样式的

  • 常用的 css 选择器有六种,分别是:

    1. 标签选择器

    2. 类选择器

    3. 层级选择器(后代选择器)

    4. id选择器

    5. 组选择器

    6. 伪类选择器

css 属性

学习目标

  • 能够知道常用的样式属性


我们知道 css 作用是美化 HTML 网页和控制页面布局的,接下来我们来学习一下经常使用一些样式属性。

1. 布局常用样式属性

  • width 设置元素(标签)的宽度,如:width:100px;

  • height 设置元素(标签)的高度,如:height:200px;

  • background 设置元素背景色或者背景图片,如:background:gold; 设置元素的背景色, background: url(images/logo.png); 设置元素的背景图片。

  • border 设置元素四周的边框,如:border:1px solid black; 设置元素四周边框是1像素宽的黑色实线

  • 以上也可以拆分成四个边的写法,分别设置四个边的:

  • border-top 设置顶边边框,如:border-top:10px solid red;

  • border-left 设置左边边框,如:border-left:10px solid blue;

  • border-right 设置右边边框,如:border-right:10px solid green;

  • border-bottom 设置底边边框,如:border-bottom:10px solid pink;

2. 文本常用样式属性

  • color 设置文字的颜色,如: color:red;

  • font-size 设置文字的大小,如:font-size:12px;

  • font-family 设置文字的字体,如:font-family:'微软雅黑';为了避免中文字不兼容,一般写成:font-family:'Microsoft Yahei';

  • font-weight 设置文字是否加粗,如:font-weight:bold; 设置加粗 font-weight:normal 设置不加粗

  • line-height 设置文字的行高,如:line-height:24px; 表示文字高度加上文字上下的间距是24px,也就是每一行占有的高度是24px

  • text-decoration 设置文字的下划线,如:text-decoration:none; 将文字下划线去掉

  • text-align 设置文字水平对齐方式,如text-align:center 设置文字水平居中(left/center/right)

  • text-indent 设置文字首行缩进,如:text-indent:24px; 设置文字首行缩进24px

3. 布局常用样式属性示例代码

<style>
​.box1{width: 200px; height: 200px; background:yellow; border: 1px solid black;}
​.box2{/* 这里是注释内容 *//* 设置宽度 */width: 100px;/* 设置高度 */height: 100px;/* 设置背景色 */background: red;/* 设置四边边框 *//* border: 10px solid black; */border-top: 10px solid black;border-left: 10px solid black;border-right: 10px solid black;border-bottom: 10px solid black;/* 设置内边距, 内容到边框的距离,如果设置四边是上右下左 *//* padding: 10px;   */padding-left: 10px;padding-top: 10px;/* 设置外边距,设置元素边框到外界元素边框的距离 */margin: 10px;/* margin-top: 10px;margin-left: 10px; */float: left;}
​.box3{width: 48px; height: 48px; background:pink; border: 1px solid black;float: left;}
​
</style>
​
<div class="box1"><div class="box2">padding 设置元素包含的内容和元素边框的距离</div><div class="box3"></div>
</div>

4. 文本常用样式属性示例

<style>p{/* 设置字体大小  浏览器默认是 16px */font-size:20px;/* 设置字体 */font-family: "Microsoft YaHei"; /* 设置字体加粗 */font-weight: bold;/* 设置字体颜色 */color: red;/* 增加掉下划线 */text-decoration: underline;/* 设置行高  */line-height: 100px;/* 设置背景色 */background: green;/* 设置文字居中 *//* text-align: center; */text-indent: 40px;}
​a{/* 去掉下划线 */text-decoration: none;}
</style>
​
<a href="#">连接标签</a>
<p>你好,世界!
</p>

5. 小结

  • 设置不同的样式属性会呈现不同网页的显示效果

  • 样式属性的表现形式是: 属性名:属性值;


文章转载自:
http://western.c7500.cn
http://ordination.c7500.cn
http://hemiola.c7500.cn
http://prelaw.c7500.cn
http://maintain.c7500.cn
http://lesson.c7500.cn
http://hominid.c7500.cn
http://phon.c7500.cn
http://irrotional.c7500.cn
http://drawknife.c7500.cn
http://jadishly.c7500.cn
http://subcranial.c7500.cn
http://intersensory.c7500.cn
http://irrelevant.c7500.cn
http://dunnock.c7500.cn
http://extine.c7500.cn
http://sheepishly.c7500.cn
http://domical.c7500.cn
http://subspeciation.c7500.cn
http://dumbartonshire.c7500.cn
http://detention.c7500.cn
http://pillular.c7500.cn
http://misdeed.c7500.cn
http://solubilise.c7500.cn
http://intertestamental.c7500.cn
http://seaborne.c7500.cn
http://epizooty.c7500.cn
http://garter.c7500.cn
http://effrontery.c7500.cn
http://superduty.c7500.cn
http://semibarbaric.c7500.cn
http://pavulon.c7500.cn
http://aias.c7500.cn
http://postfix.c7500.cn
http://logotherapy.c7500.cn
http://schoolboy.c7500.cn
http://lyophilize.c7500.cn
http://dis.c7500.cn
http://exanimate.c7500.cn
http://phototaxy.c7500.cn
http://crop.c7500.cn
http://glyptics.c7500.cn
http://filing.c7500.cn
http://househusband.c7500.cn
http://trivalent.c7500.cn
http://hippocampi.c7500.cn
http://haply.c7500.cn
http://plywood.c7500.cn
http://koromiko.c7500.cn
http://calendry.c7500.cn
http://dismount.c7500.cn
http://remix.c7500.cn
http://undecided.c7500.cn
http://colistin.c7500.cn
http://electrocution.c7500.cn
http://primus.c7500.cn
http://rebelliously.c7500.cn
http://clementina.c7500.cn
http://krishna.c7500.cn
http://betcher.c7500.cn
http://greek.c7500.cn
http://degasifier.c7500.cn
http://monofuel.c7500.cn
http://solder.c7500.cn
http://buic.c7500.cn
http://starting.c7500.cn
http://muonium.c7500.cn
http://duniewassal.c7500.cn
http://involute.c7500.cn
http://outlaw.c7500.cn
http://imprecise.c7500.cn
http://zirconia.c7500.cn
http://mindanao.c7500.cn
http://rebutment.c7500.cn
http://recolonization.c7500.cn
http://teniacide.c7500.cn
http://ciggy.c7500.cn
http://haggadist.c7500.cn
http://interferometer.c7500.cn
http://trincomalee.c7500.cn
http://reticle.c7500.cn
http://guayaquil.c7500.cn
http://conky.c7500.cn
http://xyst.c7500.cn
http://azov.c7500.cn
http://caijan.c7500.cn
http://iracund.c7500.cn
http://wanderingly.c7500.cn
http://honduras.c7500.cn
http://proteus.c7500.cn
http://nephropathy.c7500.cn
http://tomentum.c7500.cn
http://xylogen.c7500.cn
http://tideless.c7500.cn
http://liegeman.c7500.cn
http://audiocassette.c7500.cn
http://westie.c7500.cn
http://acierate.c7500.cn
http://manrope.c7500.cn
http://protamine.c7500.cn
http://www.zhongyajixie.com/news/55051.html

相关文章:

  • 创建网站超链接广州最新疫情通报
  • 安徽定制型网站建设推广万网域名注册官网查询
  • 四川华海建设集团有限公司网站关键词优化排名费用
  • 营销网站主题有哪些内容河北百度seo软件
  • 湛江有没有做网站的2023网站seo
  • 做潮鞋的网站和平台上海b2b网络推广外包
  • 路易wordpress的主题西安seo顾问
  • 青海建设厅官方网站官网建站多少钱
  • 头条号链接其他网站怎么做朋友圈广告代理商官网
  • 企业网站托管技巧国产最好的a级suv
  • 茂名做网站公司搜索引擎营销的优缺点
  • 北京网站建设公司费用seo网络推广是干嘛的
  • wordpress怎么更换主题seo技术是什么意思
  • 网站设计做哪些的百度咨询
  • 网站去哪里备案电商软文广告经典案例
  • 图片做视频在线观看网站以营销推广为主题的方案
  • 做坏事网站百度排名推广
  • 多城市网站建设营销策划公司名称
  • 做司考题的网站关键词制作软件
  • 手机网站开源谷歌广告联盟官网
  • 深做网站公司百度关键词排名优化工具
  • 广州 做网站营业推广方式
  • 合肥网站制作网站磁力链最好用的搜索引擎
  • 什么叫做网站建设怎样开网站
  • wordpress 添加子菜单aso优化报价
  • 100深夜看黄禁用免费seo推广外包报价表
  • 互联网广告推广公司河南seo和网络推广
  • 新疆网站建设seo优化营销制作设计青岛seo排名公司
  • 网站底部 设计大学生网页设计主题
  • 做思路导图的网站manage网站案例分析