照片墙案例

整体效果:

HTML部分:

<body>
		<div class="content">
			<header>
				<h1>A silent world</h1>
				<span>Image Wall with jQuery and CSS3</span>
			</header>
			<div class="iw_wrapper">
				<ul class="iw_thumbs" id="iw_thumbs">
					<li><img src="images/thumbs/1.jpg" data-img="images/full/1.jpg" alt="Thumb1" />
						<div>
							<h2>Serenity</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/2.jpg" data-img="images/full/2.jpg" alt="Thumb2" />
						<div>
							<h2>Silence</h2>
							<p>Separated they live in Bookmarksgrove right at the coast of the Semantics.</p>
						</div>
					</li>
					<li><img src="images/thumbs/3.jpg" data-img="images/full/3.jpg" alt="Thumb3" />
						<div>
							<h2>Abstraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/8.jpg" data-img="images/full/8.jpg" alt="Thumb8" />
						<div>
							<h2>Happiness</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/9.jpg" data-img="images/full/9.jpg" alt="Thumb9" />
						<div>
							<h2>Greatness</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/10.jpg" data-img="images/full/10.jpg" alt="Thumb10" />
						<div>
							<h2>Abstraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/6.jpg" data-img="images/full/6.jpg" alt="Thumb6" />
						<div>
							<h2>Virtue</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/7.jpg" data-img="images/full/7.jpg" alt="Thumb7" />
						<div>
							<h2>Beauty</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/8.jpg" data-img="images/full/8.jpg" alt="Thumb8" />
						<div>
							<h2>Happiness</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/12.jpg" data-img="images/full/12.jpg" alt="Thumb12" />
						<div>
							<h2>Greatness</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/4.jpg" data-img="images/full/4.jpg" alt="Thumb4" />
						<div>
							<h2>Attraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/5.jpg" data-img="images/full/5.jpg" alt="Thumb5" />
						<div>
							<h2>Growth</h2>
							<p>A small river named Duden flows by their place and supplies it with the necessary regelialia.</p>
						</div>
					</li>
					<li><img src="images/thumbs/6.jpg" data-img="images/full/6.jpg" alt="Thumb6" />
						<div>
							<h2>Virtue</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/7.jpg" data-img="images/full/7.jpg" alt="Thumb7" />
						<div>
							<h2>Beauty</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/10.jpg" data-img="images/full/10.jpg" alt="Thumb10" />
						<div>
							<h2>Abstraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/11.jpg" data-img="images/full/11.jpg" alt="Thumb11" />
						<div>
							<h2>Attraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/3.jpg" data-img="images/full/3.jpg" alt="Thumb3" />
						<div>
							<h2>Virtue</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/13.jpg" data-img="images/full/13.jpg" alt="Thumb13" />
						<div>
							<h2>Happiness</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/14.jpg" data-img="images/full/14.jpg" alt="Thumb14" />
						<div>
							<h2>Serenity</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/2.jpg" data-img="images/full/2.jpg" alt="Thumb1" />
						<div>
							<h2>Virtue</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/4.jpg" data-img="images/full/4.jpg" alt="Thumb2" />
						<div>
							<h2>Serenity</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/11.jpg" data-img="images/full/11.jpg" alt="Thumb11" />
						<div>
							<h2>Attraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/12.jpg" data-img="images/full/12.jpg" alt="Thumb12" />
						<div>
							<h2>Virtue</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/13.jpg" data-img="images/full/13.jpg" alt="Thumb13" />
						<div>
							<h2>Happiness</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/14.jpg" data-img="images/full/14.jpg" alt="Thumb14" />
						<div>
							<h2>Serenity</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/2.jpg" data-img="images/full/2.jpg" alt="Thumb1" />
						<div>
							<h2>Virtue</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/4.jpg" data-img="images/full/4.jpg" alt="Thumb2" />
						<div>
							<h2>Serenity</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/6.jpg" data-img="images/full/6.jpg" alt="Thumb3" />
						<div>
							<h2>Attraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/8.jpg" data-img="images/full/8.jpg" alt="Thumb4" />
						<div>
							<h2>Serenity</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/12.jpg" data-img="images/full/12.jpg" alt="Thumb1" />
						<div>
							<h2>Serenity</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/2.jpg" data-img="images/full/2.jpg" alt="Thumb2" />
						<div>
							<h2>Silence</h2>
							<p>Separated they live in Bookmarksgrove right at the coast of the Semantics.</p>
						</div>
					</li>
					<li><img src="images/thumbs/3.jpg" data-img="images/full/3.jpg" alt="Thumb3" />
						<div>
							<h2>Abstraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/4.jpg" data-img="images/full/4.jpg" alt="Thumb4" />
						<div>
							<h2>Attraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/5.jpg" data-img="images/full/5.jpg" alt="Thumb5" />
						<div>
							<h2>Growth</h2>
							<p>A small river named Duden flows by their place and supplies it with the necessary regelialia.</p>
						</div>
					</li>
					<li><img src="images/thumbs/6.jpg" data-img="images/full/6.jpg" alt="Thumb6" />
						<div>
							<h2>Virtue</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/7.jpg" data-img="images/full/7.jpg" alt="Thumb7" />
						<div>
							<h2>Beauty</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/8.jpg" data-img="images/full/8.jpg" alt="Thumb8" />
						<div>
							<h2>Happiness</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/9.jpg" data-img="images/full/9.jpg" alt="Thumb9" />
						<div>
							<h2>Greatness</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/10.jpg" data-img="images/full/10.jpg" alt="Thumb10" />
						<div>
							<h2>Abstraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/11.jpg" data-img="images/full/11.jpg" alt="Thumb11" />
						<div>
							<h2>Attraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/1.jpg" data-img="images/full/1.jpg" alt="Thumb12" />
						<div>
							<h2>Virtue</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/13.jpg" data-img="images/full/13.jpg" alt="Thumb13" />
						<div>
							<h2>Happiness</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/14.jpg" data-img="images/full/14.jpg" alt="Thumb14" />
						<div>
							<h2>Serenity</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/2.jpg" data-img="images/full/2.jpg" alt="Thumb1" />
						<div>
							<h2>Virtue</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/4.jpg" data-img="images/full/4.jpg" alt="Thumb2" />
						<div>
							<h2>Serenity</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
					<li><img src="images/thumbs/6.jpg" data-img="images/full/6.jpg" alt="Thumb3" />
						<div>
							<h2>Attraction</h2>
							<p>Far far away, behind the word mountains there live the blind texts.</p>
						</div>
					</li>
				</ul>
			</div>
			<div id="iw_ribbon" class="iw_ribbon">
				<span class="iw_close"></span>
				<span class="iw_zoom">Click thumb to zoom</span>
			</div>
		</div>
		<div class="footer">
			<a class="left" href="http://tympanus.net/Development/SlidingLetters/"><span>&laquo; Previous Demo:</span>Sliding Letters with jQuery</a>
			<a href="http://tympanus.net/codrops/2011/05/25/image-wall/"><strong>back to the Codrops tutorial</strong></a>
			<a href="http://www.flickr.com/photos/markjsebastian/" target="_blank">Photos by Mark Sebastian</a>
		</div>

CSS部分:

body{
	background:#f7f7f7 url(../images/pinstripe.gif) repeat top left;
	color:#000;
	font-family: Georgia, "Times New Roman",sans-serif;
	font-size:12px;
}
a{
	color:#000;
	text-decoration:none;
}
header h1{
	margin:10px 0 0 20px;
	font-size:100px;
	text-transform:uppercase;
	text-shadow:0px 0px 1px #fff;
	color:#444;
	font-family: 'Wire One', arial, serif; 
}
header span{
	font-style:italic;
	margin:-10px 0 10px 188px;
	display:block;
	color:#555;
	text-shadow:1px 1px 1px #fff;
}
.iw_wrapper{
	width:70%;
	margin:30px auto 100px auto;
	position:relative;
}
ul.iw_thumbs li{
	float:left;
	margin:5px;
}
ul.iw_thumbs li div{
	position:absolute;
	top:5px;
	width:180px;
	padding:0px 10px;
	display:none;
	color:#fff;
	z-index:100;
}
ul.iw_thumbs li div h2{
	font-family: 'Wire One', arial, serif;
	font-size:38px;
	text-transform:uppercase;
	text-shadow:0px 0px 1px #fff;
}
ul.iw_thumbs li div p{
	font-size:11px;
	line-height:16px;
	font-style:italic;
}
ul.iw_thumbs li:nth-child(1){
	margin-left:50px;
}
ul.iw_thumbs li:nth-child(even){
	margin-top:30px;
}
ul.iw_thumbs li:nth-child(3n){
	margin-left:20px;
}
ul.iw_thumbs li img{
	border:7px solid #fff;
	cursor:pointer;
	position:relative;
	-moz-box-shadow:1px 1px 1px #aaa;
	-webkit-box-shadow:1px 1px 1px #aaa;
	box-shadow:1px 1px 1px #aaa;
}
ul.iw_thumbs li img:hover{
	-moz-box-shadow:1px 1px 7px #777;
	-webkit-box-shadow:1px 1px 7px #777;
	box-shadow:1px 1px 7px #777;
}
ul.iw_thumbs li:nth-child(even) img{
	height:20px;
}
ul.iw_thumbs li:nth-child(odd) img{
	height:40px;
}
ul.iw_thumbs li:nth-child(5n) img{
	height:70px;
}
ul.iw_thumbs li:nth-child(6n) img{
	height:110px;
}
ul.iw_thumbs li:nth-child(7n) img{
	height:20px;
}
.iw_ribbon{
	position:fixed;
	height:126px; /*first 126 then 0 to close and 100% to open (while top goes to 0) */
	width:0px;/*first 0 then animate to 100%*/
	left:0px;/*or right 0*/
	top:0px; /*First, top of thumb, then animate to 0*/
	background:#000;
	opacity:0.8;
	z-index:10;
	overflow:hidden;
	display:none;
}
.iw_close{
	position:absolute;
	top:10px;
	right:10px;
	background:#f0f0f0 url(../images/close.gif) no-repeat center center;
	width:18px;
	height:18px;
	display:none;
	cursor:pointer;
}
.iw_zoom{
	color:white;
	font-size:8px;
	font-family:Arial, sans-serif;
	text-transform:uppercase;
	padding:14px;
	display:none;
	float:right;
	margin-right:30px;
}
.iw_ribbon img{
	position:absolute;
	top:50%;
	left:50%;
	border:7px solid #fff;
}
.iw_loading{
	background: #fff url(../images/loader.gif) no-repeat center center;
	width:28px;
	height:28px;
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 10000;
	margin: -14px 0px 0px -14px;
	opacity:0.8;
}
/* Footer Style */
.footer{
	position:fixed;
	bottom:0px;
	left:0px;
	width:100%;
	font-size:13px;
	background:#000;
	opacity:0.9;
	height:20px;
	padding-bottom:5px;
	text-transform:uppercase;
	font-family: 'PT Sans Narrow', Arial, sans-serif;
	z-index:4;
}
.footer a{
	padding:5px 10px;
	letter-spacing:1px;
	text-shadow:1px 1px 1px #000;
	color:#ddd;
	float:right;
}
.footer a:hover{
	color:#fff;
}
.footer a span{
	font-weight:bold;
}
.footer a.left{
	float:left;
}

JS部分:

$(window).load(function() {
				var $iw_thumbs = $('#iw_thumbs'),
					$iw_ribbon = $('#iw_ribbon'),
					$iw_ribbon_close = $iw_ribbon.children('span.iw_close'),
					$iw_ribbon_zoom = $iw_ribbon.children('span.iw_zoom');

				ImageWall = (function() {
					// window width and height
					var w_dim,
						// index of current image
						current = -1,
						isRibbonShown = false,
						isFullMode = false,
						// ribbon / images animation settings
						ribbonAnim = {
							speed: 500,
							easing: 'easeOutExpo'
						},
						imgAnim = {
							speed: 400,
							easing: 'jswing'
						},
						// init function : call masonry, calculate window dimentions, initialize some events
						init = function() {
							$iw_thumbs.imagesLoaded(function() {
								$iw_thumbs.masonry({
									isAnimated: true
								});
							});
							getWindowsDim();
							initEventsHandler();
						},
						// calculate window dimentions
						getWindowsDim = function() {
							w_dim = {
								width: $(window).width(),
								height: $(window).height()
							};
						},
						// initialize some events
						initEventsHandler = function() {

							// click on a image
							$iw_thumbs.delegate('li', 'click', function() {
								if($iw_ribbon.is(':animated')) return false;

								var $el = $(this);

								if($el.data('ribbon')) {
									showFullImage($el);
								} else if(!isRibbonShown) {
									isRibbonShown = true;

									$el.data('ribbon', true);

									// set the current
									current = $el.index();

									showRibbon($el);
								}
							});

							// click ribbon close
							$iw_ribbon_close.bind('click', closeRibbon);

							// on window resize we need to recalculate the window dimentions
							$(window).bind('resize', function() {
									getWindowsDim();
									if($iw_ribbon.is(':animated'))
										return false;
									closeRibbon();
								})
								.bind('scroll', function() {
									if($iw_ribbon.is(':animated'))
										return false;
									closeRibbon();
								});

						},
						showRibbon = function($el) {
							var $img = $el.children('img'),
								$descrp = $img.next();

							// fadeOut all the other images
							$iw_thumbs.children('li').not($el).animate({
								opacity: 0.2
							}, imgAnim.speed);

							// increase the image z-index, and set the height to 100px (default height)
							$img.css('z-index', 100)
								.data('originalHeight', $img.height())
								.stop()
								.animate({
									height: '100px'
								}, imgAnim.speed, imgAnim.easing);

							// the ribbon will animate from the left or right
							// depending on the position of the image
							var ribbonCssParam = {
									top: $el.offset().top - $(window).scrollTop() - 6 + 'px'
								},
								descriptionCssParam,
								dir;

							if($el.offset().left < (w_dim.width / 2)) {
								dir = 'left';
								ribbonCssParam.left = 0;
								ribbonCssParam.right = 'auto';
							} else {
								dir = 'right';
								ribbonCssParam.right = 0;
								ribbonCssParam.left = 'auto';
							}

							$iw_ribbon.css(ribbonCssParam)
								.show()
								.stop()
								.animate({
									width: '100%'
								}, ribbonAnim.speed, ribbonAnim.easing, function() {
									switch(dir) {
										case 'left':
											descriptionCssParam = {
												'left': $img.outerWidth(true) + 'px',
												'text-align': 'left'
											};
											break;
										case 'right':
											descriptionCssParam = {
												'left': '-200px',
												'text-align': 'right'
											};
											break;
									};
									$descrp.css(descriptionCssParam).fadeIn();
									// show close button and zoom
									$iw_ribbon_close.show();
									$iw_ribbon_zoom.show();
								});

						},
						// close the ribbon
						// when in full mode slides in the middle of the page
						// when not slides left
						closeRibbon = function() {
							isRibbonShown = false

							$iw_ribbon_close.hide();
							$iw_ribbon_zoom.hide();

							if(!isFullMode) {

								// current wall image
								var $el = $iw_thumbs.children('li').eq(current);

								resetWall($el);

								// slide out ribbon
								$iw_ribbon.stop()
									.animate({
										width: '0%'
									}, ribbonAnim.speed, ribbonAnim.easing);

							} else {
								$iw_ribbon.stop().animate({
									opacity: 0.8,
									height: '0px',
									marginTop: w_dim.height / 2 + 'px' // half of window height
								}, ribbonAnim.speed, function() {
									$iw_ribbon.css({
										'width': '0%',
										'height': '126px',
										'margin-top': '0px'
									}).children('img').remove();
								});

								isFullMode = false;
							}
						},
						resetWall = function($el) {
							var $img = $el.children('img'),
								$descrp = $img.next();

							$el.data('ribbon', false);

							// reset the image z-index and height
							$img.css('z-index', 1).stop().animate({
								height: $img.data('originalHeight')
							}, imgAnim.speed, imgAnim.easing);

							// fadeOut the description
							$descrp.fadeOut();

							// fadeIn all the other images
							$iw_thumbs.children('li').not($el).animate({
								opacity: 1
							}, imgAnim.speed);
						},
						showFullImage = function($el) {
							isFullMode = true;

							$iw_ribbon_close.hide();

							var $img = $el.children('img'),
								large = $img.data('img'),

								// add a loading image on top of the image
								$loading = $('<span class="iw_loading"></span>');

							$el.append($loading);

							// preload large image
							$('<img/>').load(function() {
								var $largeImage = $(this);

								$loading.remove();

								$iw_ribbon_zoom.hide();

								resizeImage($largeImage);

								// reset the current image in the wall
								resetWall($el);

								// animate ribbon in and out
								$iw_ribbon.stop().animate({
									opacity: 1,
									height: '0px',
									marginTop: '63px' // half of ribbons height
								}, ribbonAnim.speed, function() {
									// add the large image to the DOM
									$iw_ribbon.prepend($largeImage);

									$iw_ribbon_close.show();

									$iw_ribbon.animate({
										height: '100%',
										marginTop: '0px',
										top: '0px'
									}, ribbonAnim.speed);
								});
							}).attr('src', large);

						},
						resizeImage = function($image) {
							var widthMargin = 100,
								heightMargin = 100,

								windowH = w_dim.height - heightMargin,
								windowW = w_dim.width - widthMargin,
								theImage = new Image();

							theImage.src = $image.attr("src");

							var imgwidth = theImage.width,
								imgheight = theImage.height;

							if((imgwidth > windowW) || (imgheight > windowH)) {
								if(imgwidth > imgheight) {
									var newwidth = windowW,
										ratio = imgwidth / windowW,
										newheight = imgheight / ratio;

									theImage.height = newheight;
									theImage.width = newwidth;

									if(newheight > windowH) {
										var newnewheight = windowH,
											newratio = newheight / windowH,
											newnewwidth = newwidth / newratio;

										theImage.width = newnewwidth;
										theImage.height = newnewheight;
									}
								} else {
									var newheight = windowH,
										ratio = imgheight / windowH,
										newwidth = imgwidth / ratio;

									theImage.height = newheight;
									theImage.width = newwidth;

									if(newwidth > windowW) {
										var newnewwidth = windowW,
											newratio = newwidth / windowW,
											newnewheight = newheight / newratio;

										theImage.height = newnewheight;
										theImage.width = newnewwidth;
									}
								}
							}

							$image.css({
								'width': theImage.width + 'px',
								'height': theImage.height + 'px',
								'margin-left': -theImage.width / 2 + 'px',
								'margin-top': -theImage.height / 2 + 'px'
							});
						};

					return {
						init: init
					};
				})();

				ImageWall.init();
			});

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/266805.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

3D数字化系统建设

以3D可视化、数字化技术为基础&#xff0c;其实&#xff0c;很多传统的系统软件都可以重新做一下。 比如&#xff1a;以下这个使用场景&#xff1a;零售门店陈列&#xff1b; 还有&#xff0c;数字化仓储系统&#xff0c;3D数字化供应链系统&#xff0c;3D数字化的生产系统&a…

.NET中的Swagger使用

目录 前言 一、Swagger是什么&#xff1f; 二、如何Swagger文档说明的信息 1.在AddSwaggerGen方法中写入文档信息 2.运行效果 二、文档UI界面标题、路由设置 1.在中间件UseSwaggerUI方法中配置 三、文档UI界面添加接口注释 1.在 .csproj中配置 2.在AddSwaggerGen方法中配置Incl…

MFC 菜单

目录 MFC菜单 菜单使用 添加菜单资源 将菜单设置到窗口 ON_COMMAND消息处理 命令消息 WM_COMMAND 的处理顺序 设置菜单项状态 右键菜单 MFC菜单 在Win32编程中&#xff0c;使用菜单句柄 HMENU 来标识菜单&#xff0c;在MFC中使用CMenu类对象表示菜单。封装了关于菜单的…

MATLAB - 四元数(quaternion)

系列文章目录 前言 一、简介 四元数是一种四元超复数&#xff0c;用于三维旋转和定向。 四元数的表示形式为 abicjdk&#xff0c;其中 a、b、c 和 d 为实数&#xff0c;i、j 和 k 为基元&#xff0c;满足等式&#xff1a;i2 j2 k2 ijk -1。 四元数集用 H 表示&#xff0c…

vmware安装中标麒麟高级服务器操作系统软件 V7.0操作系统

vmware安装中标麒麟高级服务器操作系统软件 V7.0操作系统 1、下载中标麒麟高级服务器操作系统软件 V7.0镜像2、安装中标麒麟高级服务器操作系统软件 V7.0操作系统 1、下载中标麒麟高级服务器操作系统软件 V7.0镜像 官方提供使用通道 访问官网 链接: https://www.kylinos.cn/ 下…

【Python】基于flaskMVT架构与session实现博客前台登录登出功能

目录 一、MVT说明 1.Model层 2.View层 3.Template层 二、功能说明 三、代码框架展示 四、具体代码实现 models.py 登录界面前端代码 博客界面前端代码&#xff08;profile.html&#xff09; main.py 一、MVT说明 MVT架构是Model-View-Template的缩写&#xff0c;是…

VS(Visual Studio)更改文件编码

vs默认编码是GB2312,更改为UTF-8 工具->自定义

Tomcat与Netty比较

Tomcat介绍Tomcat支持的协议Tomcat的优缺点Netty介绍Netty支持的协议Netty的优点和缺点Tomcat和Netty的区别Tomcat和Netty的应用场Tomcat和Netty来处理大规模并发连接的优化Tomcat与Netty的网络模型的区别Tomcat与Netty架构设计拓展 Tomcat介绍 Tomcat是一个免费的、开放源代码…

nodejs+vue+ElementUi摄影作品图片分享工作室管理系统

第1周 2.21&#xff5e;2.27 查阅资料&#xff0c;学习vscode开发平台和vue框架技术 第2周 2.28&#xff5e;3.6 对软件功能需求进行分析, 软件功能模块划分及软件界面设计 第3周 3.7&#xff5e;3.13 撰写并提交毕业设计开题报告、英文资料翻译 第4周 3.14&#xff5…

深度学习中的池化

1 深度学习池化概述 1.1 什么是池化 池化层是卷积神经网络中常用的一个组件&#xff0c;池化层经常用在卷积层后边&#xff0c;通过池化来降低卷积层输出的特征向量&#xff0c;避免出现过拟合的情况。池化的基本思想就是对不同位置的特征进行聚合统计。池化层主要是模仿人的…

【docker笔记】docker理论及安装

前言 本笔记来源于尚硅谷docker教学视频 视频地址&#xff1a;https://www.bilibili.com/video/BV1gr4y1U7CY/?spm_id_from333.337.search-card.all.click 纯手打笔记&#xff0c;来之不易&#xff0c;感谢支持~ Docker简介 docker为什么会出现 想象一下&#xff1a;一个应用…

Web前端-JavaScript(Dom基础)

文章目录 1.1 DOM 介绍1.1.1 DOM简介1.1.2 DOM树 1.2. 获取元素1.2.1 根据ID获取元素1.2.2 根据标签名获取元素1.2.3 其它方式获取元素1.2.4 获取特殊元素 1.3 事件基础1.3.1 事件概述1.3.2 事件三要素1.3.3 执行事件步骤1.3.4 鼠标事件 1.4 操作元素1.4.1 操作元素内容1.4.2 属…

Java小案例-MusiQ音乐网站

目录 前言 项目功能 技术栈 后端 前端 开发环境 项目展示 前台-首页-展示 前台-首页-代码 前台-歌单-展示 前台-歌单-代码 前台-歌手-展示 前台-歌手-代码 前台-其他页面展示 后台-登录-展示 后台-登录-代码 后台-首页-展示 首台-首页-代码 后台-其他页面-展…

PyQt6 QColorDialog颜色对话框控件

锋哥原创的PyQt6视频教程&#xff1a; 2024版 PyQt6 Python桌面开发 视频教程(无废话版) 玩命更新中~_哔哩哔哩_bilibili2024版 PyQt6 Python桌面开发 视频教程(无废话版) 玩命更新中~共计50条视频&#xff0c;包括&#xff1a;2024版 PyQt6 Python桌面开发 视频教程(无废话版…

基于Qt之QChart 图表(优美的曲线图案例)

## 项目演示 平台:ubuntu18.04 Qt版本:QT5.14.2 源码位置GitCode:https://gitcode.com/m0_45463480/QCharts/tree/main ## QChart 图表 自从 Qt 发布以来,给跨平台的用户带来很多便利。在 Qt5.7 之前,Qt 在开源社区版本里没有 Qt Charts(自带的绘图组件库)。这使得像…

SpringBoot的日志管理

&#x1f648;作者简介&#xff1a;练习时长两年半的Java up主 &#x1f649;个人主页&#xff1a;程序员老茶 &#x1f64a; ps:点赞&#x1f44d;是免费的&#xff0c;却可以让写博客的作者开心好久好久&#x1f60e; &#x1f4da;系列专栏&#xff1a;Java全栈&#xff0c;…

Kubernetes api-server源码阅读2(Debug Kubernetes篇)

云原生学习路线导航页&#xff08;持续更新中&#xff09; 本文是 Kubernetes api-server源码阅读 系列第二篇&#xff0c;主要讲述如何实现 kubernetes api-server 的 debug 参考b站视频地址&#xff1a;Kubernetes源码开发之旅二 1.本篇章任务 Go-Delve&#xff1a;go语言的…

INFINI Gateway 如何防止大跨度查询

背景 业务每天生成一个日期后缀的索引&#xff0c;写入当日数据。 业务查询有时会查询好多天的数据&#xff0c;导致负载告警。 现在想对查询进行限制–只允许查询一天的数据&#xff08;不限定是哪天&#xff09;&#xff0c;如果想查询多天的数据就走申请。 技术分析 在每…

排序算法——桶排序

把数据放进若干个桶&#xff0c;然后在桶里用其他排序&#xff0c;近乎分治思想。从数值的低位到高位依次排序&#xff0c;有几位就排序几次。例如二位数就排两次&#xff0c;三位数就排三次&#xff0c;依次按照个十百...的顺序来排序。 第一次排序&#xff1a;50 12 …

二级指针的作用 -- 将变量从函数中带出

使用一级指针不能将变量带出 void test(int *p) {static int nub 10; /*使用static是保证函数结束, 变量依然存在, 不然即使将它带出来, 函数结束时这片内存已经被释放了就没有意义了*/p &nub; }int main(void) {int *p NULL;test(p);printf("%d",*p);return …