これは私のコードです。 私はまだCSSの初心者です 私はこの質問をしています。私はすべてを試してみました。 問題は、ヘッダーにパディングを追加して、ヘッダーのすべての要素を右に押すように見えるときです。 ここに何か不足していますか?ヘッダーにパディングを追加すると、ヘッダーが右端にプッシュされますか?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>To do list app</title>
<style type="text/css">
header {
width: 100%;
height: 80px;
position: fixed;
padding: 15px;
top: 0;
left: 0;
z-index: 5;
background: #25b99a;
box-shadow: 0px 2px 4px rgba(44,62,80,0.15);
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
header input {
width: 100%;
height: 50px;
float: left;
background: rgba(255,255,255, 0.2);
border-radius: 5px;
border-bottom-right-radius: 25px;
border-top-right-radius: 25px;
border: 0px;
box-shadow: none;
outline: none;
-webkit-appearance: none;
-moz-appearance: none;
-ms-appearance: none;
-o-appearance: none;
appearance: none;
}
</style>
</head>
<body>
<header>
<input type="text" placeholder="Enter an activity..">
</header>
</body>
</html>
パディングコードを提供できますか?あなたは何を達成したいですか? – jParmar
画面の右側を通過しないヘッダーを作成したい –