Hirdetés
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Kormányok / autós szimulátorok topikja
- AMD Navi Radeon™ RX 7xxx sorozat
- Milyen billentyűzetet vegyek?
- Telekom TV SmartBox: szolgáltatói set-top box alacsony korlátokkal
- Nvidia GPU-k jövője - amit tudni vélünk
- AMD Ryzen 9 / 7 / 5 / 3 5***(X) "Zen 3" (AM4)
- VGA hiba
- Combos kis mini PC-vel jelentkezett a GMKtec
- Sony MILC fényképezőgépcsalád
Hirdetés
Talpon vagyunk, köszönjük a sok biztatást! Ha segíteni szeretnél, boldogan ajánljuk Előfizetéseinket!
Új hozzászólás Aktív témák
-
Helló skacok. Lenne egy kérdésem. Van arra megoldás, hogy ebben a kódban friss élő hírek fussanak a "News Item 1 | News Item 2 | News Item 3" helyett? Remélem, hogy csináltatok már ilyet...köszi, ha tudtok adni tanácsot.
<!DOCTYPE html>
<html>
<head>
<style>
.news-container {
display: flex;
justify-content: flex-end;
align-items: center;
height: 50px;
background-color: lightgray;
}
.news-item {
padding: 10px;
font-size: 20px;
color: black;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</head>
<body>
<div class="news-container">
<marquee class="news-item" behavior="scroll" direction="left">
News Item 1 | News Item 2 | News Item 3
</marquee>
</div>
</body>
</html>Adott 1-2 tippet a chatgpt, de nem akarnak működni, vagy valamit rosszul csinálok...
<!DOCTYPE html>
<html>
<head>
<style>
.news-container {
display: flex;
justify-content: flex-end;
align-items: center;
height: 50px;
background-color: lightgray;
}
.news-item {
padding: 10px;
font-size: 20px;
color: black;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</head>
<body>
<div class="news-container">
<marquee class="news-item" behavior="scroll" direction="left" id="news-item">
Loading news...
</marquee>
</div>
<script>
// Fetch the CNN news from an API
const apiUrl = "https://api.example.com/cnnnews";
fetch(apiUrl)
.then(response => response.json())
.then(data => {
// Update the news item text with the fetched news
const newsItem = document.getElementById("news-item");
newsItem.innerText = `CNN Breaking News: ${data.breakingNews} | CNN Latest Headlines: ${data.latestHeadlines}`;
})
.catch(error => {
console.error("Error fetching CNN news:", error);
});
</script>
</body>
</html>vagy ezt:
<!DOCTYPE html>
<html>
<head>
<style>
.news-container {
display: flex;
justify-content: flex-end;
align-items: center;
height: 50px;
background-color: lightgray;
}
.news-item {
padding: 10px;
font-size: 20px;
color: black;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</head>
<body>
<div class="news-container">
<marquee class="news-item" behavior="scroll" direction="left" id="news-item">
Loading news...
</marquee>
</div>
<script>
// Fetch the Google news from the API
const apiUrl = "https://news.google.com/home?hl=hu&gl=HU&ceid=HU:hu";
fetch(apiUrl)
.then(response => response.text())
.then(data => {
// Parse the fetched data to extract the news headlines
const parser = new DOMParser();
const htmlDocument = parser.parseFromString(data, "text/html");
const headlines = htmlDocument.querySelectorAll(".pg-c:not(.pg-c-t)");
// Concatenate the headlines into a single string
const headlinesText = Array.from(headlines)
.map(headline => headline.textContent.trim())
.join(" | ");
// Update the news item text with the fetched headlines
const newsItem = document.getElementById("news-item");
newsItem.innerText = headlinesText;
})
.catch(error => {
console.error("Error fetching Google news:", error);
});
</script>
</body>
</html>
Új hozzászólás Aktív témák
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- Kormányok / autós szimulátorok topikja
- Elektromos autók - motorok
- AMD Navi Radeon™ RX 7xxx sorozat
- E-roller topik
- Kerékpárosok, bringások ide!
- Milyen billentyűzetet vegyek?
- HBO Max
- Mibe tegyem a megtakarításaimat?
- Telekom mobilszolgáltatások
- További aktív témák...
- MacSzerez.com - 2017 MacBook Pro 15" / i7 2.9GHz - 4 Mag / 16GB RAM / 512GB SSD / Radeon Pro 4GB
- MacSzerez.com - iPhone 13 Pro Max / 128GB / Asztro szürke / Garancia!
- MacSzerez.com - iPhone 13 Pro Max / 128GB / Sierra Blue / Új Apple akkumulátor!
- Nitro AN515-57 15.6" FHD IPS i5-11400H RTX 3050 16GB 512GB NVMe + 1TB HDD magyar vbill gar
- MacSzerez.com - iPad Pro 11" / M1 / Ezüst / Wifi / 128GB / Garancia
- Azonnali készpénzes Sony Playstation 5 lemezes és digitális felvásárlás személyesen/csomagküldéssel
- Xiaomi Redmi 9 32GB, Kártyafüggetlen, 1 Év Garanciával
- Acer TravelMate P214 i3-1115G4 8GB 256GB 14" FHD 1év garancia
- HIBÁTLAN iPhone 15 Pro 256GB Black Titanium -1 ÉV GARANCIA - Kártyafüggetlen, MS3003
- Lenovo, Dell, HP, Panasonic Getac üzleti és ütésálló katonai laptopok + Ipad 6-13. gneráció
Állásajánlatok
Cég: FOTC
Város: Budapest