Python
4
Вклад в тег
>>> a = str(2)
>>> b = str(4)
>>> c = a+b
>>> print(c)
24
>>> a = int(2)
>>> b = int(4)
>>> c = a+b
>>> print(c)
6
print('Hello it is a calculator')
print('Number 1 ')
a = int(input())
print('Number 2')
b = int(input())
c = a+b;
print(c)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Горизонтальная прокрутка колесиком мыши</title>
<style>
/* .wrapper::-webkit-scrollbar {
display: none;
} */
.wrapper {
width: 100%;
white-space: nowrap;
overflow-x: auto;
}
.item {
display: inline-block;
width: 200px;
height: 200px;
margin-right: 10px;
background-color: #f0f0f0;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
<div class="item"></div>
</div>
<script>
document.addEventListener("DOMContentLoaded", function() {
const wrapper = document.querySelector(".wrapper");
wrapper.addEventListener("wheel", (event) => {
if (event.deltaY !== 0) {
wrapper.scrollLeft += event.deltaY;
event.preventDefault();
}
});
});
</script>
</body>
</html>