Saleh Kamal نشر 31 ديسمبر 2023 أرسل تقرير نشر 31 ديسمبر 2023 (معدل) مع ازرار تم التعديل في 31 ديسمبر 2023 بواسطة Saleh Kamal اقتباس
1 كمال صالح2 نشر 31 ديسمبر 2023 أرسل تقرير نشر 31 ديسمبر 2023 HTML: <!DOCTYPE html> <html lang="ar"> <head> <link rel="icon" href="https://c0.klipartz.com/pngpicture/573/614/gratis-png-ng%C5%A9-hanh-s%C6%A1n-distrito-casa-apartamento-inmobiliaria-volta-redonda-venta-de-logotipos-de-bienes-raices.png" /> <title>اسم الموقع</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@300&display=swap" rel="stylesheet"> <meta charset="utf-8" /> <link rel="stylesheet" type="text/css" media="screen" href="home.css"> </head> <body> <header> <div> <img src="a.png" alt="اسم النظام"> </div> <center> <div> <button>1</button> <button>2</button> <button>3</button> <button>4</button> <button>5 </button> <button>6 </button> </div> </center> </header> </body> </html> CSS: *{ margin: 0; padding: 0; } header{ width:100%; height: 70px; background-color:lightskyblue; box-shadow: 0px 0px 12px skyblue; } header button{ width:140px; padding:10px; margin-top:12px; border:none; background-color:lightblue; outline:none; font-size:18px; box-shadow:0px 0px 8px skyblue; font-family: "tajawal", sans-serif; font-weight: bold; transition: 1s; color:black; font-family: 'Tajawal', sans-serif; } header button:hover{ color:mediumblue; background-color:skyblue; box-shadow:0px 0px 15px mediumblue } header img{ width:70px; float:left; margin-top:0px; margin-left:10px; } بتاريخ 3 دقائق مضت قال كمال صالح محمد: HTML: <!DOCTYPE html> <html lang="ar"> <head> <link rel="icon" href="https://c0.klipartz.com/pngpicture/573/614/gratis-png-ng%C5%A9-hanh-s%C6%A1n-distrito-casa-apartamento-inmobiliaria-volta-redonda-venta-de-logotipos-de-bienes-raices.png" /> <title>اسم الموقع</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Tajawal:wght@300&display=swap" rel="stylesheet"> <meta charset="utf-8" /> <link rel="stylesheet" type="text/css" media="screen" href="home.css"> </head> <body> <header> <div> <img src="a.png" alt="اسم النظام"> </div> <center> <div> <button>1</button> <button>2</button> <button>3</button> <button>4</button> <button>5 </button> <button>6 </button> </div> </center> </header> </body> </html> CSS: *{ margin: 0; padding: 0; } header{ width:100%; height: 70px; background-color:lightskyblue; box-shadow: 0px 0px 12px skyblue; } header button{ width:140px; padding:10px; margin-top:12px; border:none; background-color:lightblue; outline:none; font-size:18px; box-shadow:0px 0px 8px skyblue; font-family: "tajawal", sans-serif; font-weight: bold; transition: 1s; color:black; font-family: 'Tajawal', sans-serif; } header button:hover{ color:mediumblue; background-color:skyblue; box-shadow:0px 0px 15px mediumblue } header img{ width:70px; float:left; margin-top:0px; margin-left:10px; } لازم يتم الربط بين HTML وCSS 1 اقتباس
0 Ali Alzhrani نشر 16 سبتمبر أرسل تقرير نشر 16 سبتمبر <!DOCTYPE html> <html lang="ar" dir="rtl"> <head> <meta charset="UTF-8"> <title>شاشة الجدول</title> <style> body {font-family: Arial, sans-serif; text-align: center; background: #f4f4f4; direction: rtl;} table {margin: 50px auto; border-collapse: collapse; width: 70%; background: white; box-shadow: 0 0 10px rgba(0,0,0,0.2);} th, td {padding: 15px; border: 1px solid #333;} th {background: #4CAF50; color: white;} td {font-size: 18px;} </style> </head> <body> <h2>📅 شاشة جدول قسم الحاسب الآلي</h2> <table id="scheduleTable"> <tr> <th>المقرر</th> <th>الدكتور</th> <th>اليوم</th> <th>الوقت</th> <th>القاعة</th> </tr> <tr> <td colspan="5">سيتم عرض الجدول هنا...</td> </tr> </table> <script> // بيانات المحاضرات const lectures = [ {course: "نظم وتشغيل 2", doctor: "د. منير الزبيدي", day: "الأحد", time: "8:00", room: "215"}, {course: "مهارات الدعم الفني", doctor: "د. علي الزهراني", day: "الثلاثاء", time: "8:00", room: "212"} ]; let index = 0; function showLecture() { const lecture = lectures[index]; const table = document.getElementById("scheduleTable"); table.innerHTML = ` <tr> <th>المقرر</th> <th>الدكتور</th> <th>اليوم</th> <th>الوقت</th> <th>القاعة</th> </tr> <tr> <td>${lecture.course}</td> <td>${lecture.doctor}</td> <td>${lecture.day}</td> <td>${lecture.time}</td> <td>${lecture.room}</td> </tr> `; index = (index + 1) % lectures.length; } // أول عرض showLecture(); // التغيير كل 5 ثواني للتجربة setInterval(showLecture, 5000); </script> </body> </html> اقتباس
0 Ali Alzhrani نشر 16 سبتمبر أرسل تقرير نشر 16 سبتمبر <!DOCTYPE html> <html lang="ar" dir="rtl"> <head> <meta charset="UTF-8"> <title>شاشة الجدول</title> <style> body {font-family: Arial, sans-serif; text-align: center; background: #f4f4f4; direction: rtl;} table {margin: 50px auto; border-collapse: collapse; width: 70%; background: white; box-shadow: 0 0 10px rgba(0,0,0,0.2);} th, td {padding: 15px; border: 1px solid #333;} th {background: #4CAF50; color: white;} td {font-size: 18px;} </style> </head> <body> <h2>📅 شاشة جدول قسم الحاسب الآلي</h2> <table id="scheduleTable"> <tr> <th>المقرر</th> <th>الدكتور</th> <th>اليوم</th> <th>الوقت</th> <th>القاعة</th> </tr> <tr> <td colspan="5">سيتم عرض الجدول هنا...</td> </tr> </table> <script> // بيانات المحاضرات const lectures = [ {course: "نظم وتشغيل 2", doctor: "د. منير الزبيدي", day: "الأحد", time: "8:00", room: "215"}, {course: "مهارات الدعم الفني", doctor: "د. علي الزهراني", day: "الثلاثاء", time: "8:00", room: "212"} ]; let index = 0; function showLecture() { const lecture = lectures[index]; const table = document.getElementById("scheduleTable"); table.innerHTML = ` <tr> <th>المقرر</th> <th>الدكتور</th> <th>اليوم</th> <th>الوقت</th> <th>القاعة</th> </tr> <tr> <td>${lecture.course}</td> <td>${lecture.doctor}</td> <td>${lecture.day}</td> <td>${lecture.time}</td> <td>${lecture.room}</td> </tr> `; index = (index + 1) % lectures.length; } // أول عرض showLecture(); // التغيير كل 5 ثواني للتجربة setInterval(showLecture, 5000); </script> </body> </html> اقتباس
0 ريان قرايري نشر 27 سبتمبر أرسل تقرير نشر 27 سبتمبر <!DOCTYPE html> <html lang="ar"> <head> <meta charset="UTF-8"> <title>طائرة العقبات ✈️</title> <style> body { margin: 0; background: #87CEEB; text-align: center; font-family: Arial, sans-serif; } canvas { background: #87CEEB; display: block; margin: auto; border: 3px solid #000; } h1 { margin: 10px; } </style> </head> <body> <h1>✈️ لعبة الطائرة وتخطي الحواجز</h1> <p>اضغط المسافة للقفز!</p> <canvas id="gameCanvas" width="400" height="500"></canvas> <script> const canvas = document.getElementById('gameCanvas'); const ctx = canvas.getContext('2d'); // اللاعب (الطائرة) let plane = { x: 80, y: 200, width: 30, height: 30, velocity: 0, gravity: 0.6, lift: -10 }; let score = 0; let gameOver = false; // الحواجز let pipes = []; const pipeWidth = 50; const gap = 120; let pipeSpeed = 2; // أول حاجز pipes.push({ x: canvas.width, top: Math.random() * 200 + 20 }); // التحكم document.addEventListener('keydown', function (e) { if (e.code === 'Space' && !gameOver) { plane.velocity = plane.lift; } else if (gameOver && e.code === 'Space') { location.reload(); // إعادة اللعبة } }); function drawPlane() { ctx.fillStyle = 'red'; ctx.fillRect(plane.x, plane.y, plane.width, plane.height); } function drawPipes() { ctx.fillStyle = 'green'; pipes.forEach(pipe => { // الجزء العلوي ctx.fillRect(pipe.x, 0, pipeWidth, pipe.top); // الجزء السفلي ctx.fillRect(pipe.x, pipe.top + gap, pipeWidth, canvas.height); }); } function update() { if (gameOver) return; // حركة الطائرة plane.velocity += plane.gravity; plane.y += plane.velocity; // تحديث الحواجز pipes.forEach(pipe => { pipe.x -= pipeSpeed; }); // إضافة حواجز جديدة if (pipes[pipes.length - 1].x < canvas.width - 150) { pipes.push({ x: canvas.width, top: Math.random() * 200 + 20 }); } // إزالة الحواجز القديمة if (pipes[0].x + pipeWidth < 0) { pipes.shift(); score++; } // تصادم pipes.forEach(pipe => { if ( plane.x < pipe.x + pipeWidth && plane.x + plane.width > pipe.x && (plane.y < pipe.top || plane.y + plane.height > pipe.top + gap) ) { gameOver = true; } }); // اصطدام بالأرض أو السقف if (plane.y + plane.height > canvas.height || plane.y < 0) { gameOver = true; } } function drawScore() { ctx.fillStyle = 'black'; ctx.font = '20px Arial'; ctx.fillText('النقاط: ' + score, 10, 30); } function drawGameOver() { ctx.fillStyle = 'black'; ctx.font = '30px Arial'; ctx.fillText('انتهت اللعبة!', 100, canvas.height / 2 - 10); ctx.font = '18px Arial'; ctx.fillText('اضغط المسافة لإعادة اللعب', 90, canvas.height / 2 + 20); } function loop() { ctx.clearRect(0, 0, canvas.width, canvas.height); drawPlane(); drawPipes(); drawScore(); update(); if (gameOver) { drawGameOver(); } else { requestAnimationFrame(loop); } } loop(); </script> </body> </html> <!DOCTYPE html> <html lang="ar"> <head> <meta charset="UTF-8"> <title>طائرة العقبات ✈️</title> <style> body { margin: 0; background: #87CEEB; text-align: center; font-family: Arial, sans-serif; } canvas { background: #87CEEB; display: block; margin: auto; border: 3px solid #000; } h1 { margin: 10px; } </style> </head> <body> <h1>✈️ لعبة الطائرة وتخطي الحواجز</h1> <p>اضغط المسافة للقفز!</p> <canvas id="gameCanvas" width="400" height="500"></canvas> <script> const canvas = document.getElementById('gameCanvas'); const ctx = canvas.getContext('2d'); // اللاعب (الطائرة) let plane = { x: 80, y: 200, width: 30, height: 30, velocity: 0, gravity: 0.6, lift: -10 }; let score = 0; let gameOver = false; // الحواجز let pipes = []; const pipeWidth = 50; const gap = 120; let pipeSpeed = 2; // أول حاجز pipes.push({ x: canvas.width, top: Math.random() * 200 + 20 }); // التحكم document.addEventListener('keydown', function (e) { if (e.code === 'Space' && !gameOver) { plane.velocity = plane.lift; } else if (gameOver && e.code === 'Space') { location.reload(); // إعادة اللعبة } }); function drawPlane() { ctx.fillStyle = 'red'; ctx.fillRect(plane.x, plane.y, plane.width, plane.height); } function drawPipes() { ctx.fillStyle = 'green'; pipes.forEach(pipe => { // الجزء العلوي ctx.fillRect(pipe.x, 0, pipeWidth, pipe.top); // الجزء السفلي ctx.fillRect(pipe.x, pipe.top + gap, pipeWidth, canvas.height); }); } function update() { if (gameOver) return; // حركة الطائرة plane.velocity += plane.gravity; plane.y += plane.velocity; // تحديث الحواجز pipes.forEach(pipe => { pipe.x -= pipeSpeed; }); // إضافة حواجز جديدة if (pipes[pipes.length - 1].x < canvas.width - 150) { pipes.push({ x: canvas.width, top: Math.random() * 200 + 20 }); } // إزالة الحواجز القديمة if (pipes[0].x + pipeWidth < 0) { pipes.shift(); score++; } // تصادم pipes.forEach(pipe => { if ( plane.x < pipe.x + pipeWidth && plane.x + plane.width > pipe.x && (plane.y < pipe.top || plane.y + plane.height > pipe.top + gap) ) { gameOver = true; } }); // اصطدام بالأرض أو السقف if (plane.y + plane.height > canvas.height || plane.y < 0) { gameOver = true; } } function drawScore() { ctx.fillStyle = 'black'; ctx.font = '20px Arial'; ctx.fillText('النقاط: ' + score, 10, 30); } function drawGameOver() { ctx.fillStyle = 'black'; ctx.font = '30px Arial'; ctx.fillText('انتهت اللعبة!', 100, canvas.height / 2 - 10); ctx.font = '18px Arial'; ctx.fillText('اضغط المسافة لإعادة اللعب', 90, canvas.height / 2 + 20); } function loop() { ctx.clearRect(0, 0, canvas.width, canvas.height); drawPlane(); drawPipes(); drawScore(); update(); if (gameOver) { drawGameOver(); } else { requestAnimationFrame(loop); } } loop(); </script> </body> </html> اقتباس
0 Omar Khaled36 نشر منذ 12 ساعة أرسل تقرير نشر منذ 12 ساعة <!doctype html> <html lang="ar"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width,initial-scale=1" /> <title>محاكاة لعبة التفاحة — تعليمية</title> <style> body{font-family: system-ui,Segoe UI,Roboto,"Helvetica Neue",Arial; background:#f6f7fb;color:#111;margin:0;padding:20px;direction:rtl} .container{max-width:820px;margin:0 auto;background:#fff;border-radius:12px;padding:18px;box-shadow:0 6px 24px rgba(12,20,40,0.08)} h1{margin:0 0 12px;font-size:22px} .row{display:flex;gap:12px;align-items:center;flex-wrap:wrap} .apples{display:flex;gap:10px;margin:16px 0} .apple{width:96px;height:96px;border-radius:12px;background:#ffefef;display:flex;align-items:center;justify-content:center;font-size:26px;cursor:pointer;box-shadow:0 6px 14px rgba(0,0,0,0.06);user-select:none} .apple.locked{opacity:0.45;cursor:default} input[type=number]{padding:8px;border-radius:8px;border:1px solid #e0e4ef;width:120px} button{padding:10px 14px;border-radius:10px;border:0;background:#0b79f7;color:#fff;cursor:pointer} button.secondary{background:#6b7280} .status{margin-top:12px;padding:12px;border-radius:8px;background:#fbfbff;border:1px solid #eef2ff} .stats{margin-top:10px;font-size:14px;color:#374151} .small{font-size:13px;color:#6b7280} </style> </head> <body> <div class="container"> <h1>محاكاة لعبة "التفاحة" — تجريبي وآمن</h1> <div class="row"> <div> <div>الرصيد الافتراضي: <strong id="balance">1000</strong> وحدة</div> <div class="small">*هذا محاكي تعليمي فقط، لا يتصل بأي منصة مراهنات</div> </div> <div style="margin-left:auto"> <label>اختر عدد التفاحات: <select id="appleCount"> <option value="3">3</option> <option value="5" selected>5</option> <option value="7">7</option> <option value="9">9</option> </select> </label> </div> </div> <div style="margin-top:12px" class="row"> <label>مقدار الرهان: <input id="betAmount" type="number" min="1" value="50" /> </label> <label>مضاعف الفوز (تقريبي): <input id="payout" type="number" min="1" value="4" /> </label> <button id="startBtn">ابدأ جولة</button> <button id="resetBtn" class="secondary">إعادة ضبط</button> </div> <div class="apples" id="applesArea" aria-live="polite"></div> <div class="status" id="status">اضغط "ابدأ جولة" لاختيار التفاحات وعرضها.</div> <div class="stats" id="stats">جولات: 0 — فوز: 0 — خسارة: 0</div> </div> <script> (function(){ // عناصر const balanceEl = document.getElementById('balance'); const applesArea = document.getElementById('applesArea'); const startBtn = document.getElementById('startBtn'); const resetBtn = document.getElementById('resetBtn'); const appleCountSelect = document.getElementById('appleCount'); const betAmountInput = document.getElementById('betAmount'); const payoutInput = document.getElementById('payout'); const statusEl = document.getElementById('status'); const statsEl = document.getElementById('stats'); // حالة اللعبة let state = { balance: 1000, rounds: 0, wins: 0, losses: 0, active: false, winningIndex: null, appleCount: parseInt(appleCountSelect.value,10) }; function renderApples(n){ applesArea.innerHTML = ''; for(let i=0;i<n;i++){ const d = document.createElement('div'); d.className='apple'; d.dataset.index = i; d.innerText = '🍎'; applesArea.appendChild(d); d.addEventListener('click', onAppleClick); } } function updateUI(){ balanceEl.innerText = state.balance; statsEl.innerText = `جولات: ${state.rounds} — فوز: ${state.wins} — خسارة: ${state.losses}`; const apples = applesArea.querySelectorAll('.apple'); apples.forEach((a)=>{ a.classList.toggle('locked', !state.active); }); } function startRound(){ const bet = Number(betAmountInput.value) || 0; if(state.active){ statusEl.innerText = 'الجولة شغالة حاليًّا — اختَر تفاحة أو أعد تشغيل.'; return; } if(bet<=0){ statusEl.innerText='اكتب قيمة رهان أكبر من صفر.'; return; } if(bet>state.balance){ statusEl.innerText='الرصيد غير كافي للرهان.'; return; } state.appleCount = parseInt(appleCountSelect.value,10); state.active = true; state.winningIndex = Math.floor(Math.random()*state.appleCount); // عرض التفاحات renderApples(state.appleCount); statusEl.innerText = `تم خصم ${bet} من رصيدك. اختَر تفاحة (1 من ${state.appleCount}).`; state.balance -= bet; updateUI(); } function onAppleClick(e){ if(!state.active) return; const pick = Number(e.currentTarget.dataset.index); revealResult(pick); } function revealResult(pick){ const bet = Number(betAmountInput.value) || 0; const payoutMult = Number(payoutInput.value) || 1; state.rounds += 1; // إظهار كل التفاحات: علامة الفوز × const apples = applesArea.querySelectorAll('.apple'); apples.forEach((a,idx)=>{ a.innerText = (idx===state.winningIndex) ? '🍏' : '🍎'; a.style.transform = (idx===pick) ? 'scale(1.06)' : 'none'; }); if(pick === state.winningIndex){ // فوز const winAmount = Math.floor(bet * payoutMult); state.balance += winAmount; state.wins += 1; statusEl.innerText = `فزت! حصلت على ${winAmount} (مضاعف ${payoutMult}).`; } else { // خسارة state.losses += 1; statusEl.innerText = `خسرت الجولة — التفاحة الصحيحة كانت رقم ${state.winningIndex+1}.`; } state.active = false; updateUI(); } function resetAll(){ state.balance = 1000; state.rounds = 0; state.wins = 0; state.losses = 0; state.active = false; state.winningIndex = null; appleCountSelect.value = '5'; betAmountInput.value = 50; payoutInput.value = 4; renderApples(state.appleCount); statusEl.innerText = 'تم إعادة الضبط. افتح جولة جديدة.'; updateUI(); } // أحداث startBtn.addEventListener('click', startRound); resetBtn.addEventListener('click', resetAll); appleCountSelect.addEventListener('change', ()=> renderApples(parseInt(appleCountSelect.value,10))); // تهيئة renderApples(state.appleCount); updateUI(); })(); </script> </body> </html> اقتباس
السؤال
Saleh Kamal
مع ازرار
تم التعديل في بواسطة Saleh Kamal5 أجوبة على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.