<html>
<head>
<link rel="stylesheet" href="normalize.css">
<meta charset="utf-8">
<title>مهمة التدرب على لغة التنسيقات</title>
<link href="https://fonts.googleapis.com/css?family=Fredoka+One|Kaushan+Script&display=swap" rel="stylesheet">
<style>
body{
background-color:#2c4068;
wight:800px;
}
div p{
background-color:white;
font-family: 'Fredoka One', cursive;
wight:200px;
hight:50px;
color:black;
text-align:center;
front-size:10px;
line-hight:20px;
box-sizing:border-box;
padding:10px;
border-left:10px solid darkorange;
margin-left: auto;
margin-right: auto;
}
p{
background-color:white;
font-family: 'Kaushan Script', cursive;
wight:200px;
hight:50px;
color:black;
text-align:center;
front-size:10px;
line-hight:20px;
text-decoration:underline solid gray;
box-sizing:border-box;
padding:10px;
border-left:10px solid lightblue;
margin-left:auto;
margin-right:auto;
}
</style>
</head>
<body>
<div>
<p>
Never give up. Today is hard, tomorrow will be worse,
but the day after tomorrow will be sunsahine
</p>
</div>
<p>
If you work just for money, you'll never make it,
but if you love what you're doing success will be yours
</p>
</body>
</html>
1 Like
لانك اعطيت كل الـ p خاصية text-decoration بشكل عام
p{
text-decoration:underline solid gray;
}
مثلاً للتطبيق على ال p الرئيسي “الثاني” خارج ال div فقط قم بتحديد الاب المباشر لل p في هذه الحالة الاب هو body فيكون التحديد كالتالي :
body > p{
text-decoration:underline solid gray;
}
بهذ الحالة انت تخبر المتصفح ان يتعامل مع اول ابن لل body و ان يكون p
2 Likes
شكراً
1 Like