做网站要准备的需求,网站做不下去,博罗建设银行网站,有固定ip自己做网站学习内容#xff1a;
css
行内样式表
页内样式表
外部样式表
同步修改所有某一类标签的内容#xff1a;内部样式表
!DOCTYPE html
html langenheadmeta charsetUTF-8meta nameviewport conte…学习内容
css
行内样式表
页内样式表
外部样式表
同步修改所有某一类标签的内容内部样式表
!DOCTYPE html
html langenheadmeta charsetUTF-8meta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyleimg {width: 300px;height: 300px;border-radius: 50%;}/style
/headbodyimg src/static/images/flower.jpg altflower/body/html
如果只想修改某一部分标签设置class
!DOCTYPE html
html langenheadmeta charsetUTF-8meta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyleimg {width: 300px;height: 300px;border-radius: 50%;}.green-p {background-color: aquamarine;}.blue-p {background-color: aqua;}.big {width: 70px;height: 70px;}/style
/headbodyimg src/static/images/flower.jpg altflowerp classblue-p , big1/pp classgreen-p , big2/pp classblue-p3/pp classgreen-p4/p/body/html
选择器
标签选择器
div
p
id选择器
#id
类选择器
.class
class 里面可以写多个格式 伪类选择器
伪类选择器 伪类用于定义元素的特殊状态。
链接伪类选择器
:link链接访问前的样式 :visited链接访问后的样式 :hover鼠标悬停时的样式 :active鼠标点击后长按时的样式 :focus聚焦后的样式 位置伪类选择器
:nth-child(n)选择是其父标签第n个子元素的所有元素。 目标伪类选择器
:target当url指向该元素时生效。 遇到的问题