Új hozzászólás Aktív témák
-
Meggyi001
veterán
válasz
Meggyi001 #21292 üzenetére
Bocsi, nem formáztam
<!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>
--------------------------<!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>
------------------------------
<!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>
https://hardverapro.hu/apro/uj_mobil_olcsobban_csak_vasarnap_estig_8gb_256_gb/friss.html
Új hozzászólás Aktív témák
- Vicces képek
- AMD Ryzen 9 / 7 / 5 / 3 5***(X) "Zen 3" (AM4)
- Milyen légkondit a lakásba?
- Samsung Galaxy S23 és S23+ - ami belül van, az számít igazán
- Samsung Galaxy S24 Ultra - ha működik, ne változtass!
- Milyen monitort vegyek?
- gban: Ingyen kellene, de tegnapra
- Elektromos rásegítésű kerékpárok
- Gaming notebook topik
- Milyen okostelefont vegyek?
- További aktív témák...
- Lenovo ThinkStation P720 Workstation: 2db Xeon proci + 128GB RAM + Quadro RTX4000 8GB + 512GB SSD
- Lenovo ThinkStation P720 Workstation: 2db Xeon proci + 64GB RAM + Quadro P4000 8GB + 512GB SSD + Win
- HP Pavilion x360 14-ek Convertible - ÚJ - 14" TOUCH notebook - i5-1235U, 16GB, 512SSD, Win11
- DJI AVATA Pro-View Combo drón (DJI goggles 2) - 2 akku, Motion Controller 2 - 1 év garancia
- LETISZTULT PC ÁTLAG FELADATOKRA - AMD R5 5600G - 16GB DDR4 RAM - 500GB NVME SSD