javascript - main head .intro-text{width:40%} main head{display:flex}為何無效?
問題描述
<!DOCTYPE html><html lang='en'>
<head>
<meta charset='UTF-8'><title>Build a Personal Portfolio Webpage</title><link rel='stylesheet' href='http://m.cgvv.com.cn/wenda/rule/bootstrap-Normalize.css'><link rel='stylesheet' ><link rel='stylesheet' href='http://m.cgvv.com.cn/wenda/main.css'><style> body{font-size:20px} main{margin-top:80px;padding:30px 50px} main head{display:flex} main head .intro-text{width:40%}
/# sourceMappingURL=main.css.map /
</style>
</head>
<body>
<header class='navbar navbar-inverse navbar-fixed-top'> <nav class='container'><a href='http://m.cgvv.com.cn/wenda/4784.html#'>Free Code Camp</a><ul class='nav navbar-nav navbar-text navbar-right'> <li><a href='http://m.cgvv.com.cn/wenda/4784.html#'>about</a></li> <li><a href='http://m.cgvv.com.cn/wenda/4784.html#portfolio'>portfolio</a></li> <li><a href='http://m.cgvv.com.cn/wenda/4784.html#contact'>contact</a></li></ul> </nav></header><main class='container'> <header><p class='intro-text'> <p>Front-End Developer and UX/UI designer, with practical experience in project management, branding strategy, and creative direction; devoted to functional programming and information architecture.</p> <hr> <span> Web Developer - User Experience Designer - Graphic Artist </span></p><img src='http://qlip.in/images/avatar.jpg' alt='666'> </header> </main>
</body>
</html>
/# sourceMappingURL=main.css.map /
問題解答
回答1:body {font-size:20px}main {margin-top:80px;padding:30px 50px}main header {display:flex}main header .intro-text {width:40%}
是不是因?yàn)閼?yīng)該是header啊??你寫成了head。
相關(guān)文章:
1. css3 - [CSS] 動畫效果 3D翻轉(zhuǎn)bug2. dockerfile - [docker build image失敗- npm install]3. python - pandas按照列A和列B分組,將列C求平均數(shù),怎樣才能生成一個列A,B,C的dataframe4. java - Tomcat 不同的域名訪問同一個項(xiàng)目的不同網(wǎng)頁5. docker gitlab 如何git clone?6. 使用mysql自增主鍵遇到的問題7. javascript - vue-router怎么不能實(shí)現(xiàn)跳轉(zhuǎn)呢8. docker不顯示端口映射呢?9. java如何高效讀寫10G以上大文件10. javascript - IOS微信audio標(biāo)簽不能通過touchend播放
