CSS都要在head里添加<style></style>吗?
烟雨江南
烟雨江南 2016-12-19 10:59:59
0
3
1338

<style type="text/css"></style>这句代码中 type="text/css"表示什么意思?

烟雨江南
烟雨江南

reply all(3)
数据分析师

Do I need to add <style></style> in the head for CSS? -PHP Chinese website Q&A-Does CSS have to add <style></style> in the head? -PHP Chinese website Q&A

Please watch and learn.

Ty80

 type="text/css"没有任何用处,可以删掉的,这是历史遗留下来的。个人建议样式写在css样式表文件里,不要写在页面里。如:<link rel="stylesheet" href="/static/font-awesome/css/font-awesome.css?1.1.1"/>

迷茫

它是CSS样式的标记。
type->类型,这里是style的属性
text/css ->文本/css,即css文本
type="text/css"  表示的是浏览器的解释方式,如果不定义的话,有些CSS效果 浏览器解释得不一样。

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!