鼠标移入到元素上时,出现提示文字和属性选择器

title属性可以给任何html元素指定,当鼠标移入到元素上时,元素中的title属性的值将会作为提示文字显示

<p title="友情提示语">但是绥芬河</p>
p[title]{
//选择具有title属性的p元素
}
p[title="hello"]{
  //选择title属性值是hello的p元素
}
p[title^="abc"]{
//选择title属性值以abc开头的p元素
}

p[title$=".pdf"]{
//选择title属性值以.pdf结尾的p元素
}
p[title*=gh]{
//选择属性值包含gh的p元素,不限gh出现的位置
}





猜你喜欢

转载自blog.csdn.net/parade0393/article/details/80783282