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://www.baoyu77737.com/wenda/rule/bootstrap-Normalize.css'><link rel='stylesheet' ><link rel='stylesheet' href='http://www.baoyu77737.com/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://www.baoyu77737.com/wenda/4784.html#'>Free Code Camp</a><ul class='nav navbar-nav navbar-text navbar-right'> <li><a href='http://www.baoyu77737.com/wenda/4784.html#'>about</a></li> <li><a href='http://www.baoyu77737.com/wenda/4784.html#portfolio'>portfolio</a></li> <li><a href='http://www.baoyu77737.com/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%}
是不是因為應該是header啊??你寫成了head。
相關文章:
1. python - 啟動Eric6時報錯:’qscintilla_zh_CN’ could not be loaded2. php - 微信開發驗證服務器有效性3. MySQL中的enum類型有什么優點?4. android下css3動畫非常卡,GPU也不差啊5. mysql - 記得以前在哪里看過一個估算時間的網站6. css3 - 純css實現點擊特效7. javascript - 關于<a>元素與<input>元素的JS事件運行問題8. javascript - vue 怎么渲染自定義組件9. python - 有什么好的可以收集貨幣基金的資源?10. html - vue項目中用到了elementUI問題
