-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path24-html-icerigini-bir-kutuya-aktarma.htm
More file actions
122 lines (89 loc) · 4.49 KB
/
24-html-icerigini-bir-kutuya-aktarma.htm
File metadata and controls
122 lines (89 loc) · 4.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html>
<html>
<head>
<title>HTML İçeriğini Bir Kutuya Aktarmak</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- DIŞARIDAN YÜKLENEN KÜTÜPHANE DOSYALARI -->
<link rel="stylesheet" type="text/css" href="kutuphane/basic.css">
<script src="kutuphane/basic.js" type="text/javascript" charset="utf-8"></script>
<style>
/* Tüm nesnelerdeki yazılar seçilebilsin. */
.basic_box, .basic_label, .basic_button, .basic_textbox-main, .basic_image {
user-select: auto;
-webkit-user-select: auto;
}
/* Kaydırma çubuğunu özelleştir. */
.basic_box::-webkit-scrollbar {
width: 10px;
height: 10px;
/* NOT: Kaydırma çubuğu, kutu nesnesinin içinde 10px lik bir yer kaplıyor. */
}
.basic_box::-webkit-scrollbar-track {
/* background: rgba(0, 0, 0, 0.08); */
border-radius: 10px;
border: 3px solid rgba(0, 0, 0, 0);
background-clip: padding-box;
}
.basic_box::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.2);
border-radius: 10px;
border: 3px solid rgba(0, 0, 0, 0); /* Transparent border together with `background-clip: padding-box` does the trick */
background-clip: padding-box;
}
.basic_box::-webkit-scrollbar-thumb:hover {
background: rgba(0, 0, 0, 0.4);
border-radius: 10px;
border: 3px solid rgba(0, 0, 0, 0); /* Transparent border together with `background-clip: padding-box` does the trick */
background-clip: padding-box;
}
.colored-word {
color: orangered;
font-family: opensans-bold;
background-color: white;
border: 1px solid orangered;
border-radius: 10px;
padding-left: 8px;
padding-right: 8px;
opacity: 0.7;
}
</style>
<script>
/*
Body içerisine, HTML içerikler yerleştirmek
ve kod ile bu içeriği bir kutu nesnesinin içine aktarmak.
*/
// DEĞİŞKENLER
var boxContent
// BAŞLANGIÇ FONKSİYONLARI
// İlk çalışan fonksiyon.
var start = function() {
// NESNE: HTML içeriğini taşıyacak kutu.
boxContent = createBox(40, 40, 350, 250)
that.color = "whitesmoke"
that.round = 6
// HTML kodunu al ve nesnenin içine yerleştir.
that.text = document.getElementById("my-html-content").innerHTML
// Dikey kaydırmaya izin ver.
that.scrollY = 1
// Otomatik yükseklik kullanımı:
// that.height = "auto"
// that.onResize(function(self){
// print(self.height)
// })
}
</script>
</head>
<body>
<!-- HTML içeriği -->
<div id="my-html-content" style="display:none;">
<div style="margin:20px;">
<h2 style="font-family:opensans-bold;color:black;">Kodlama Nedir?</h2>
<p>Yapılmasını istediğimiz görevlerin, bilgisayar tarafından gerçekleştirilmesini sağlamak için kod olarak adlandırılan kelimeleri kullanıyoruz. Bu kodların, yazılma eylemine ise kodlama yapmak <span style="color:gray;font-style:italic;">(kod yazmak)</span> diyoruz.</p>
<p style="font-family:opensans-bold;">Hadi şimdi biraz kodlama yapalım:</p>
<p>Aşağıdaki görüntü alanında, robot isminde bir resim var. <span class="colored-word">robot.ilerle()</span> kodunu çalıştırarak; bilgisayardan, robot resmini bir adım sağ doğru hareket ettirmesini istemiş olacağız.</p>
<p><span class="colored-word">Kodu çalıştır</span> düğmesine basalım ve bilgisayarın, kod alanına yazılanları nasıl uyguladığını görelim.</p>
</div>
</div>
</body>
</html>