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.cgvv.com.cn/wenda/rule/bootstrap-Normalize.css'><link rel='stylesheet' ><link rel='stylesheet' href='http://www.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://www.cgvv.com.cn/wenda/4784.html#'>Free Code Camp</a><ul class='nav navbar-nav navbar-text navbar-right'> <li><a href='http://www.cgvv.com.cn/wenda/4784.html#'>about</a></li> <li><a href='http://www.cgvv.com.cn/wenda/4784.html#portfolio'>portfolio</a></li> <li><a href='http://www.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%}
是不是因為應該是header啊??你寫成了head。
相關文章:
1. mysql - 這條聯合sql語句哪里錯了2. webpack - vuejs+java前后臺分離實現及部署問題3. 使用uuid,并不能利用mysql的索引,有什么解決辦法?4. 網站在移動的環境下手機,pc打不開5. php - TP5的登錄驗證問題6. mysql - 我的myeclipse一直連顯示數據庫連接失敗,不知道為什么7. javascript - 微信小程序picker為什么會變成兩行?8. javascript - 微信h5發送圖文信息,部分設備點擊“發送”按鈕時沒反應,問題較難重現,如何能找到可能存在問題的點?9. linux pdo 安裝配置中 make 遇到問題,請大家指教!10. 在html文件的目錄下輸入代碼按回車后顯示這個,哪位大佬幫幫我 呀
