- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
这是我当前的 slider ,它工作正常,但它想在每次用户点击下一张或上一张图像时添加淡入淡出。如果没有 jquery,这可能吗?
这是我的代码,我使用了示例图像,以便您可以看到实际的 slider 。随时提出任何澄清问题,提前感谢您的帮助。
// getting items from the DOM
const menuButton = document.querySelector(".menuButton");
const menu = document.querySelector(".menu");
const myPortrait = document.querySelector(".myPortrait");
const menuItems = document.querySelector(".menuItems");
const navItem = document.querySelectorAll(".navItem");
const menuWrapper = document.querySelectorAll(".menuWrapper");
const photography = document.querySelector("#photography");
// Setting Initial State of Menue
let showMenu = false;
menuButton.addEventListener("click", openMenu);
function openMenu() {
if (!showMenu) {
menuButton.classList.add("close");
menu.classList.add("show");
menuWrapper.forEach(item => item.classList.add("show"));
myPortrait.classList.add("show");
menuItems.classList.add("show");
navItem.forEach(item => item.classList.add("show"));
photography.classList.add("show");
//new menue state
showMenu = true;
} else {
menuButton.classList.remove("close");
menu.classList.remove("show");
menuWrapper.forEach(item => item.classList.remove("show"));
myPortrait.classList.remove("show");
menuItems.classList.remove("show");
navItem.forEach(item => item.classList.remove("show"));
photography.classList.remove("show");
//new menue state
showMenu = false;
}
}
//------------------------photography slide show---------------------------------
let slider = document.querySelectorAll(".imgWrapper");
leftArrow = document.querySelector(".leftArrow");
rightArrow = document.querySelector(".rightArrow");
current = 0;
//clears images
function reset() {
for (let i = 0; i < slider.length; i++) {
slider[i].style.display = "none";
}
}
// starts slider
function startSlide() {
reset();
slider[0].style.display = "block";
}
// show slide left
function slideLeft() {
reset();
slider[current - 1].style.display = "block";
current--;
}
// show slide right
function slideright() {
reset();
slider[current + 1].style.display = "block";
current++;
}
//left arrow click
leftArrow.addEventListener("click", function() {
if (current === 0) {
current = slider.length;
}
slideLeft();
});
// right arrow click
rightArrow.addEventListener("click", function() {
if (current === slider.length - 1) {
current = -1;
}
slideright();
});
startSlide();
/*main.css*/
* {
margin: 0;
padding: 0;
}
/*---------BODY & BACKGROUND-----------*/
body {
font-family: "Merienda";
color: rgb(200, 150, 15);
font-size: 0.8em;
width: 100%;
height: 100vh;
}
footer {
height: 5vh;
background-color: rgb(33, 33, 33);
margin: 0 auto;
display: flex;
justify-content: center;
flex-direction: column;
text-align: center;
}
/*---------HEADING & MAIN SCREEN STUFF-----------*/
#home {
background: linear-gradient(rgba(33, 33, 33, 0.9), rgba(33, 33, 33, 0.9)),
url("/Images/Iphonexbackground.jpg");
background-size: cover;
width: 100%;
height: calc(100vh - 20vh);
padding-top: 15vh;
display: flex;
flex-flow: column;
text-align: center;
}
.largeHeading {
padding-bottom: 2vh;
}
.smallHeading {
padding-bottom: 50vh;
}
.moe {
color: white;
}
.social a {
color: rgb(200, 150, 15);
}
.social a:hover {
color: white;
transition: all 0.5s ease-out;
}
/*------------------ROTATING MENU BUTTON----------------------*/
.menuButton {
position: absolute;
z-index: 3;
right: 35px;
top: 35px;
cursor: pointer;
transition: all 0.5s ease-out;
}
.buttonLine {
width: 25px;
height: 2px;
background-color: white;
margin: 0 0 5px 0;
transition: all 0.5s ease-out;
}
.close > .buttonLine:nth-child(1) {
transform: rotate(405deg) translate(5px, 5px);
}
.close > .buttonLine:nth-child(2) {
opacity: 0;
}
.close > .buttonLine:nth-child(3) {
transform: rotate(-405deg) translate(5px, -5px);
}
/*------------------------------FULL MENU----------------------------*/
.menu {
width: 100vh;
}
/*Menu is closed by default*/
.menuWrapper {
position: fixed;
top: 0;
}
.show > .menuWrapper {
width: 100%;
margin: 0;
padding: 0;
}
/*----------------------PORTRAIT MENU-----------------------*/
/*handles image*/
.myPortrait {
transform: translate3d(-100%, 0, 0);
}
.show > .portrait {
width: 150px;
height: 150px;
background-image: url("/Images/Portrait.jpg");
background-size: cover;
border: 3px solid rgb(200, 150, 15);
border-radius: 50%;
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
}
.show > .myPortrait {
visibility: visible;
display: flex;
flex-flow: column wrap;
align-items: center;
justify-content: center;
float: none;
width: 100%;
height: 35vh;
overflow: hidden;
background-color: rgb(33, 33, 33);
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
}
/*----------------------LINK MENU-----------------------*/
.navLink {
color: rgb(200, 150, 15);
text-decoration: none;
}
.current > a {
color: white;
font-size: 1.5em;
}
.navItem a:hover {
color: white;
font-size: 1.5em;
}
.menuItems {
visibility: hidden;
transform: translate3d(100%, 0, 0);
}
.navItem {
transform: translate3d(600px, 0, 0);
}
/*handles menue items*/
.show > .menuItems {
visibility: visible;
display: flex;
flex-flow: column wrap;
align-items: center;
justify-content: center;
float: none;
width: 100%;
height: 65vh;
overflow: hidden;
background-color: rgb(33, 33, 33);
list-style: none;
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
}
/*Delays each individual link movments
coming from the right side*/
.show > .navItem:nth-child(1) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.1s;
color: brown;
}
.show > .navItem:nth-child(2) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.2s;
color: brown;
}
.show > .navItem:nth-child(3) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.3s;
color: brown;
}
.show > .navItem:nth-child(4) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.4s;
color: brown;
}
.show > .navItem:nth-child(5) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.5s;
color: brown;
}
.show > .navItem:nth-child(6) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.6s;
color: brown;
}
.show > .navItem:nth-child(7) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.7s;
color: brown;
}
.show > .navItem:nth-child(8) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.8s;
color: brown;
}
.none {
display: none;
}
/*photography.css*/
#photography {
background-color: rgb(66, 66, 66);
background-size: cover;
max-width: 100%;
height: calc(100vh - 15vh);
max-height: 100vh;
padding-top: 10vh;
display: flex;
flex-direction: column;
align-items: center;
font-size: 0.7em;
}
.photoHeading {
text-decoration: none;
color: rgb(200, 150, 15);
padding-bottom: 10px;
}
.photoWork {
width: 90%;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 10px;
overflow: scroll;
}
.photoWork a {
text-decoration: none;
}
.gallary {
background-color: rgb(33, 33, 33);
color: silver;
text-align: center;
cursor: pointer;
}
.gallary img {
max-width: 100%;
}
.gallaryDiscription {
padding: 2px;
}
.gallary:hover {
opacity: 0.5;
transform: scale(1.015);
}
.photoSocial {
padding: 10px;
}
.photoContainer {
width: 90%;
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
}
.slide {
max-width: 98%;
border: 2px solid white;
}
.photoContainer h3 {
color: white;
padding-top: 5px;
}
.show > .photoContainer > .arrow {
display: none;
}
.arrow {
cursor: pointer;
position: absolute;
top: 50%;
margin-top: 0px;
width: 0;
height: 0;
border-style: solid;
}
.leftArrow {
border-width: 30px 40px 30px 0;
border-color: transparent rgba(255, 255, 255, 0.3) transparent transparent;
left: 0;
margin-left: 25px;
}
.rightArrow {
border-width: 30px 0 40px 30px;
border-color: transparent transparent transparent rgba(255, 255, 255, 0.3);
right: 0;
margin-right: 30px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link
href="https://fonts.googleapis.com/css?family=Merienda"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.6.3/css/all.css"
integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="/CSS/main.css" />
<link rel="stylesheet" href="/CSS/photography.css" />
<link rel="stylesheet" href="/CSS/media.css" />
<title>Mohamed Negm</title>
</head>
<body>
<header>
<div class="menuButton">
<div class="buttonLine"></div>
<div class="buttonLine"></div>
<div class="buttonLine"></div>
</div>
<nav class="menu">
<div class="menuWrapper">
<div class="myPortrait"><div class="portrait"></div></div>
<ul class="menuItems">
<li class="navItem"><a href="/" class="navLink">HOME </a></li>
<li class="navItem">
<a href="about.html" class="navLink">ABOUT ME </a>
</li>
<li class="navItem">
<a href="contact.html" class="navLink">CONTACT </a>
</li>
<li class="navItem">
<a href="animationPortfolio.html" class="navLink"
>ANIMATION PORTFOLIO
</a>
</li>
<li class="navItem">
<a href="developerPortfolio.html" class="navLink"
>DEVELOPER PORTFOLIO
</a>
</li>
<li class="navItem">
<a href="educatorPortfolio.html" class="navLink"
>EDUCATOR PORTFOLIO
</a>
</li>
<li class="navItem current">
<a href="photographyPortfolio.html" class="navLink"
>PHOTOGRAPHY PORTFOLIO
</a>
</li>
<li class="navItem">
<a href="videographyPortfolio.html" class="navLink"
>VIDEOGRAPHY PORTFOLIO
</a>
</li>
</ul>
</div>
</nav>
</header>
<main id="photography">
<a href="/Pages/photographyPortfolio.html" class="photoHeading"
><h1>PHOTOGRAPHY PORTFOLIO</h1></a
>
<div class="photoContainer">
<div class="leftArrow arrow"></div>
<div class="imgWrapper">
<img src="https://www.gstatic.com/webp/gallery/1.jpg" alt="" class="slide" />
<h3>Bugs Gallery: Image 1 / 3</h3>
</div>
<div class="imgWrapper">
<img src="https://www.gstatic.com/webp/gallery/3.jpg" alt="" class="slide" />
<h3>Bugs Gallery: Image 2 / 3</h3>
</div>
<div class="imgWrapper">
<img src="https://www.gstatic.com/webp/gallery/5.jpg" alt="" class="slide" />
<h3>Bugs Gallery: Image 3 / 3</h3>
</div>
<div class="rightArrow arrow"></div>
</div>
<div class="social photoSocial">
<a
href="https://www.linkedin.com/in/mohamed-negm-332299127/"
target="_blank"
>
<i class="fab fa-linkedin fa-2x"></i
></a>
<a href="https://github.com/moenegm" target="_blank">
<i class="fab fa-github fa-2x"></i
></a>
<a href="https://www.instagram.com/moe_negm/" target="_blank">
<i class="fab fa-instagram fa-2x"></i
></a>
<a
href="https://www.youtube.com/channel/UCKZpp79IKpBMoG1C2Ufrmgw?view_as=subscriber"
target="_blank"
>
<i class="fab fa-youtube fa-2x"></i
></a>
<a
href="https://www.facebook.com/Moeanegm?ref=bookmarks"
target="_blank"
>
<i class="fab fa-facebook fa-2x"></i
></a>
</div>
</main>
<footer>Copyright © 2019</footer>
<script src="/main.js"></script>
</body>
</html>
最佳答案
你可以使用 CSS Animations通过添加以下内容淡入您的图像:
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.imgWrapper {
animation: fadeIn 1s;
}
// getting items from the DOM
const menuButton = document.querySelector(".menuButton");
const menu = document.querySelector(".menu");
const myPortrait = document.querySelector(".myPortrait");
const menuItems = document.querySelector(".menuItems");
const navItem = document.querySelectorAll(".navItem");
const menuWrapper = document.querySelectorAll(".menuWrapper");
const photography = document.querySelector("#photography");
// Setting Initial State of Menue
let showMenu = false;
menuButton.addEventListener("click", openMenu);
function openMenu() {
if (!showMenu) {
menuButton.classList.add("close");
menu.classList.add("show");
menuWrapper.forEach(item => item.classList.add("show"));
myPortrait.classList.add("show");
menuItems.classList.add("show");
navItem.forEach(item => item.classList.add("show"));
photography.classList.add("show");
//new menue state
showMenu = true;
} else {
menuButton.classList.remove("close");
menu.classList.remove("show");
menuWrapper.forEach(item => item.classList.remove("show"));
myPortrait.classList.remove("show");
menuItems.classList.remove("show");
navItem.forEach(item => item.classList.remove("show"));
photography.classList.remove("show");
//new menue state
showMenu = false;
}
}
//------------------------photography slide show---------------------------------
let slider = document.querySelectorAll(".imgWrapper");
leftArrow = document.querySelector(".leftArrow");
rightArrow = document.querySelector(".rightArrow");
current = 0;
//clears images
function reset() {
for (let i = 0; i < slider.length; i++) {
slider[i].style.display = "none";
}
}
// starts slider
function startSlide() {
reset();
slider[0].style.display = "block";
}
// show slide left
function slideLeft() {
reset();
slider[current - 1].style.display = "block";
current--;
}
// show slide right
function slideright() {
reset();
slider[current + 1].style.display = "block";
current++;
}
//left arrow click
leftArrow.addEventListener("click", function() {
if (current === 0) {
current = slider.length;
}
slideLeft();
});
// right arrow click
rightArrow.addEventListener("click", function() {
if (current === slider.length - 1) {
current = -1;
}
slideright();
});
startSlide();
/*main.css*/
* {
margin: 0;
padding: 0;
}
/*---------BODY & BACKGROUND-----------*/
body {
font-family: "Merienda";
color: rgb(200, 150, 15);
font-size: 0.8em;
width: 100%;
height: 100vh;
}
footer {
height: 5vh;
background-color: rgb(33, 33, 33);
margin: 0 auto;
display: flex;
justify-content: center;
flex-direction: column;
text-align: center;
}
/*---------HEADING & MAIN SCREEN STUFF-----------*/
#home {
background: linear-gradient(rgba(33, 33, 33, 0.9), rgba(33, 33, 33, 0.9)),
url("/Images/Iphonexbackground.jpg");
background-size: cover;
width: 100%;
height: calc(100vh - 20vh);
padding-top: 15vh;
display: flex;
flex-flow: column;
text-align: center;
}
.largeHeading {
padding-bottom: 2vh;
}
.smallHeading {
padding-bottom: 50vh;
}
.moe {
color: white;
}
.social a {
color: rgb(200, 150, 15);
}
.social a:hover {
color: white;
transition: all 0.5s ease-out;
}
/*------------------ROTATING MENU BUTTON----------------------*/
.menuButton {
position: absolute;
z-index: 3;
right: 35px;
top: 35px;
cursor: pointer;
transition: all 0.5s ease-out;
}
.buttonLine {
width: 25px;
height: 2px;
background-color: white;
margin: 0 0 5px 0;
transition: all 0.5s ease-out;
}
.close > .buttonLine:nth-child(1) {
transform: rotate(405deg) translate(5px, 5px);
}
.close > .buttonLine:nth-child(2) {
opacity: 0;
}
.close > .buttonLine:nth-child(3) {
transform: rotate(-405deg) translate(5px, -5px);
}
/*------------------------------FULL MENU----------------------------*/
.menu {
width: 100vh;
}
/*Menu is closed by default*/
.menuWrapper {
position: fixed;
top: 0;
}
.show > .menuWrapper {
width: 100%;
margin: 0;
padding: 0;
}
/*----------------------PORTRAIT MENU-----------------------*/
/*handles image*/
.myPortrait {
transform: translate3d(-100%, 0, 0);
}
.show > .portrait {
width: 150px;
height: 150px;
background-image: url("/Images/Portrait.jpg");
background-size: cover;
border: 3px solid rgb(200, 150, 15);
border-radius: 50%;
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
}
.show > .myPortrait {
visibility: visible;
display: flex;
flex-flow: column wrap;
align-items: center;
justify-content: center;
float: none;
width: 100%;
height: 35vh;
overflow: hidden;
background-color: rgb(33, 33, 33);
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
}
/*----------------------LINK MENU-----------------------*/
.navLink {
color: rgb(200, 150, 15);
text-decoration: none;
}
.current > a {
color: white;
font-size: 1.5em;
}
.navItem a:hover {
color: white;
font-size: 1.5em;
}
.menuItems {
visibility: hidden;
transform: translate3d(100%, 0, 0);
}
.navItem {
transform: translate3d(600px, 0, 0);
}
/*handles menue items*/
.show > .menuItems {
visibility: visible;
display: flex;
flex-flow: column wrap;
align-items: center;
justify-content: center;
float: none;
width: 100%;
height: 65vh;
overflow: hidden;
background-color: rgb(33, 33, 33);
list-style: none;
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
}
/*Delays each individual link movments
coming from the right side*/
.show > .navItem:nth-child(1) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.1s;
color: brown;
}
.show > .navItem:nth-child(2) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.2s;
color: brown;
}
.show > .navItem:nth-child(3) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.3s;
color: brown;
}
.show > .navItem:nth-child(4) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.4s;
color: brown;
}
.show > .navItem:nth-child(5) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.5s;
color: brown;
}
.show > .navItem:nth-child(6) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.6s;
color: brown;
}
.show > .navItem:nth-child(7) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.7s;
color: brown;
}
.show > .navItem:nth-child(8) {
transform: translate3d(0, 0, 0);
transition: all 0.5s ease-out;
transition-delay: 0.8s;
color: brown;
}
.none {
display: none;
}
/*photography.css*/
#photography {
background-color: rgb(66, 66, 66);
background-size: cover;
max-width: 100%;
height: calc(100vh - 15vh);
max-height: 100vh;
padding-top: 10vh;
display: flex;
flex-direction: column;
align-items: center;
font-size: 0.7em;
}
.photoHeading {
text-decoration: none;
color: rgb(200, 150, 15);
padding-bottom: 10px;
}
.photoWork {
width: 90%;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-gap: 10px;
overflow: scroll;
}
.photoWork a {
text-decoration: none;
}
.gallary {
background-color: rgb(33, 33, 33);
color: silver;
text-align: center;
cursor: pointer;
}
.gallary img {
max-width: 100%;
}
.gallaryDiscription {
padding: 2px;
}
.gallary:hover {
opacity: 0.5;
transform: scale(1.015);
}
.photoSocial {
padding: 10px;
}
.photoContainer {
width: 90%;
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
}
.slide {
max-width: 98%;
border: 2px solid white;
}
.photoContainer h3 {
color: white;
padding-top: 5px;
}
.show > .photoContainer > .arrow {
display: none;
}
.arrow {
cursor: pointer;
position: absolute;
top: 50%;
margin-top: 0px;
width: 0;
height: 0;
border-style: solid;
}
.leftArrow {
border-width: 30px 40px 30px 0;
border-color: transparent rgba(255, 255, 255, 0.3) transparent transparent;
left: 0;
margin-left: 25px;
}
.rightArrow {
border-width: 30px 0 40px 30px;
border-color: transparent transparent transparent rgba(255, 255, 255, 0.3);
right: 0;
margin-right: 30px;
}
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.imgWrapper {
animation: fadeIn 1s;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link
href="https://fonts.googleapis.com/css?family=Merienda"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.6.3/css/all.css"
integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/"
crossorigin="anonymous"
/>
<link rel="stylesheet" href="/CSS/main.css" />
<link rel="stylesheet" href="/CSS/photography.css" />
<link rel="stylesheet" href="/CSS/media.css" />
<title>Mohamed Negm</title>
</head>
<body>
<header>
<div class="menuButton">
<div class="buttonLine"></div>
<div class="buttonLine"></div>
<div class="buttonLine"></div>
</div>
<nav class="menu">
<div class="menuWrapper">
<div class="myPortrait"><div class="portrait"></div></div>
<ul class="menuItems">
<li class="navItem"><a href="/" class="navLink">HOME </a></li>
<li class="navItem">
<a href="about.html" class="navLink">ABOUT ME </a>
</li>
<li class="navItem">
<a href="contact.html" class="navLink">CONTACT </a>
</li>
<li class="navItem">
<a href="animationPortfolio.html" class="navLink"
>ANIMATION PORTFOLIO
</a>
</li>
<li class="navItem">
<a href="developerPortfolio.html" class="navLink"
>DEVELOPER PORTFOLIO
</a>
</li>
<li class="navItem">
<a href="educatorPortfolio.html" class="navLink"
>EDUCATOR PORTFOLIO
</a>
</li>
<li class="navItem current">
<a href="photographyPortfolio.html" class="navLink"
>PHOTOGRAPHY PORTFOLIO
</a>
</li>
<li class="navItem">
<a href="videographyPortfolio.html" class="navLink"
>VIDEOGRAPHY PORTFOLIO
</a>
</li>
</ul>
</div>
</nav>
</header>
<main id="photography">
<a href="/Pages/photographyPortfolio.html" class="photoHeading"
><h1>PHOTOGRAPHY PORTFOLIO</h1></a
>
<div class="photoContainer">
<div class="leftArrow arrow"></div>
<div class="imgWrapper">
<img src="https://www.gstatic.com/webp/gallery/1.jpg" alt="" class="slide" />
<h3>Bugs Gallery: Image 1 / 3</h3>
</div>
<div class="imgWrapper">
<img src="https://www.gstatic.com/webp/gallery/3.jpg" alt="" class="slide" />
<h3>Bugs Gallery: Image 2 / 3</h3>
</div>
<div class="imgWrapper">
<img src="https://www.gstatic.com/webp/gallery/5.jpg" alt="" class="slide" />
<h3>Bugs Gallery: Image 3 / 3</h3>
</div>
<div class="rightArrow arrow"></div>
</div>
<div class="social photoSocial">
<a
href="https://www.linkedin.com/in/mohamed-negm-332299127/"
target="_blank"
>
<i class="fab fa-linkedin fa-2x"></i
></a>
<a href="https://github.com/moenegm" target="_blank">
<i class="fab fa-github fa-2x"></i
></a>
<a href="https://www.instagram.com/moe_negm/" target="_blank">
<i class="fab fa-instagram fa-2x"></i
></a>
<a
href="https://www.youtube.com/channel/UCKZpp79IKpBMoG1C2Ufrmgw?view_as=subscriber"
target="_blank"
>
<i class="fab fa-youtube fa-2x"></i
></a>
<a
href="https://www.facebook.com/Moeanegm?ref=bookmarks"
target="_blank"
>
<i class="fab fa-facebook fa-2x"></i
></a>
</div>
</main>
<footer>Copyright © 2019</footer>
<script src="/main.js"></script>
</body>
</html>
关于javascript - 我怎样才能让我的图像 slider 淡出? (没有 Jquery),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54175348/
我正在尝试学习 Knockout 并尝试创建一个照片 uploader 。我已成功将一些图像存储在数组中。现在我想回帖。在我的 knockout 码(Javascript)中,我这样做: 我在 Jav
我正在使用 php 编写脚本。我的典型问题是如何在 mysql 中添加一个有很多替代文本和图像的问题。想象一下有机化学中具有苯结构的描述。 最有效的方法是什么?据我所知,如果我有一个图像,我可以在数据
我在两个图像之间有一个按钮,我想将按钮居中到图像高度。有人可以帮帮我吗? Entrar
下面的代码示例可以在这里查看 - http://dev.touch-akl.com/celebtrations/ 我一直在尝试做的是在 Canvas 上绘制 2 个图像(发光,然后耀斑。这些图像的链接
请检查此https://jsfiddle.net/rhbwpn19/4/ 图像预览对于第一篇帖子工作正常,但对于其他帖子则不然。 我应该在这里改变什么? function readURL(input)
我对 Canvas 有疑问。我可以用单个图像绘制 Canvas ,但我不能用单独的图像绘制每个 Canvas 。- 如果数据只有一个图像,它工作正常,但数据有多个图像,它不工作你能帮帮我吗? va
我的问题很简单。如何获取 UIImage 的扩展类型?我只能将图像作为 UIImage 而不是它的名称。图像可以是静态的,也可以从手机图库甚至文件路径中获取。如果有人可以为此提供一点帮助,将不胜感激。
我有一个包含 67 个独立路径的 SVG 图像。 是否有任何库/教程可以为每个路径创建单独的光栅图像(例如 PNG),并可能根据路径 ID 命名它们? 最佳答案 谢谢大家。我最终使用了两个答案的组合。
我想将鼠标悬停在一张图片(音乐专辑)上,然后播放一张唱片,所以我希望它向右移动并旋转一点,当它悬停时我希望它恢复正常动画片。它已经可以向右移动,但我无法让它随之旋转。我喜欢让它尽可能简单,因为我不是编
Retina iOS 设备不显示@2X 图像,它显示 1X 图像。 我正在使用 Xcode 4.2.1 Build 4D502,该应用程序的目标是 iOS 5。 我创建了一个测试应用(主/细节)并添加
我正在尝试从头开始以 Angular 实现图像 slider ,并尝试复制 w3school基于图像 slider 。 下面我尝试用 Angular 实现,谁能指导我如何使用 Angular 实现?
我正在尝试获取图像的图像数据,其中 w= 图像宽度,h = 图像高度 for (int i = x; i imageData[pos]>0) //Taking data (here is the pr
我的网页最初通过在 javascript 中动态创建图像填充了大约 1000 个缩略图。由于权限问题,我迁移到 suPHP。现在不用标准 标签本身 我正在通过这个 php 脚本进行检索 $file
我正在尝试将 python opencv 图像转换为 QPixmap。 我按照指示显示Page Link我的代码附在下面 img = cv2.imread('test.png')[:,:,::1]/2
我试图在这个 Repository 中找出语义分割数据集的 NYU-v2 . 我很难理解图像标签是如何存储的。 例如,给定以下图像: 对应的标签图片为: 现在,如果我在 OpenCV 中打开标签图像,
import java.util.Random; class svg{ public static void main(String[] args){ String f="\"
我有一张 8x8 的图片。 (位图 - 可以更改) 我想做的是能够绘制一个形状,给定一个 Path 和 Paint 对象到我的 SurfaceView 上。 目前我所能做的就是用纯色填充形状。我怎样才
要在页面上显示图像,你需要使用源属性(src)。src 指 source 。源属性的值是图像的 URL 地址。 定义图像的语法是: 在浏览器无法载入图像时,替换文本属性告诉读者她们失去的信息。此
**MMEditing是基于PyTorch的图像&视频编辑开源工具箱,支持图像和视频超分辨率(super-resolution)、图像修复(inpainting)、图像抠图(matting)、
我正在尝试通过资源文件将图像插入到我的程序中,如下所示: green.png other files 当我尝试使用 QImage 或 QPixm
我是一名优秀的程序员,十分优秀!