Hirdetés
- Bemutatkozott a Poco X7 és X7 Pro
- iPhone topik
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- Huawei P30 Pro - teletalálat
- One mobilszolgáltatások
- Samsung Galaxy S25 - végre van kicsi!
- EarFun Air Pro 4+ – érdemi plusz
- Milyen okostelefont vegyek?
- Xiaomi 15T Pro - a téma nincs lezárva
- Samsung Galaxy S24 Ultra - ha működik, ne változtass!
Ú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
- Motorolaj, hajtóműolaj, hűtőfolyadék, adalékok és szűrők topikja
- BestBuy topik
- Amazon Fire TV stick/box
- Pánik a memóriapiacon
- Bemutatkozott a Poco X7 és X7 Pro
- Telekom otthoni szolgáltatások (TV, internet, telefon)
- Autós topik
- iPhone topik
- Víz- gáz- és fűtésszerelés
- Milyen monitort vegyek?
- További aktív témák...
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPad 9th Gen 256GB, Wi-Fi+Cellular, Kártyafüggetlen, 1 Év Garanciával
- Samsung Galaxy A53 5G 128GB, Kártyafüggetlen, 1 Év Garanciával
- Lenovo ThinkPad T14S Gen1 Ryzen5 4650U 16GB Refurbished
- LG L192WS monitor eladó: 19" 1440 900
- LG UltraFine 4K és Smart Monitorok: BLACK NOVEMBER -30%
- Samsung Galaxy A16 / 4/128GB / Kártyafüggetlen / 12Hó Ganacia / BONTATLAN NULL Perces!
- Azonnali készpénzes GAMER / üzleti notebook felvásárlás személyesen / csomagküldéssel korrekt áron
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest


