当前位置: 首页 > news >正文

个人网站推广广告江阴 网站开发

个人网站推广广告,江阴 网站开发,郑州网络建,网站高级?O置1、效果 点击按钮打开弹窗&#xff1a; 打开弹窗后&#xff1a; 2、代码 <!DOCTYPE html> <html><head><title>iframe弹窗</title><style>/* 使用媒体查询来实现响应式设计 */media (min-width: 768px) {.popup {width: 80%; /* 设置…

1、效果

点击按钮打开弹窗:
在这里插入图片描述
打开弹窗后:
在这里插入图片描述

2、代码

<!DOCTYPE html>
<html><head><title>iframe弹窗</title><style>/* 使用媒体查询来实现响应式设计 */@media (min-width: 768px) {.popup {width: 80%; /* 设置弹窗宽度为80% */height: 80%; /* 设置弹窗高度为80% */}}@media (max-width: 767px) {.popup {width: 90%; /* 设置弹窗宽度为90% */height: 90%; /* 设置弹窗高度为90% */}}.overlay {position: fixed; /* 设置定位为固定定位 */top: 0; /* 距离顶部为0 */left: 0; /* 距离左侧为0 */width: 100%; /* 宽度为100% */height: 100%; /* 高度为100% */background-color: rgba(0, 0, 0, 0.5); /* 背景颜色为半透明黑色 */z-index: 9998; /* 设置层级 */display: none; /* 初始隐藏 */}.popup {position: fixed; /* 设置定位为固定定位 *//* 使用 flexbox 布局来使弹窗居中 */top: 0; /* 距离顶部为0 */left: 0; /* 距离左侧为0 */right: 0; /* 距离右侧为0 */bottom: 0; /* 距离底部为0 */margin: auto; /* 居中 *//* 添加一些样式来增加美观性和可读性 */background-color: #fff; /* 背景颜色为白色 */box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* 添加阴影效果 */border-radius: 10px; /* 设置圆角 */z-index: 9999; /* 设置层级 */display: none; /* 初始隐藏 *//* 添加一个动画效果来增加活力和吸引力 */animation: fadeIn 0.5s; /* 使用fadeIn动画,时长0.5秒 */}/* 定义一个淡入的动画 */@keyframes fadeIn {from {opacity: 0; /* 从透明度0开始 */}to {opacity: 1; /* 渐变到透明度1 */}}.close-button {position: absolute; /* 设置定位为绝对定位 */top: 10px; /* 距离顶部10像素 */right: 10px; /* 距离右侧10像素 */width: 30px; /* 宽度为30像素 */height: 30px; /* 高度为30像素 */border: none; /* 去除边框 */background-color: transparent; /* 背景透明 */cursor: pointer; /* 鼠标指针为手型 */}.close-button:hover {transform: scale(1.1); /* 鼠标悬停时放大1.1倍 */}.close-button:active {transform: scale(0.9); /* 鼠标点击时缩小0.9倍 */}.close-icon {width: 100%; /* 宽度100% */height: 100%; /* 高度100% */}.iframe-container {width: 100%; /* 宽度100% */height: 100%; /* 高度100% */overflow: hidden; /* 隐藏溢出内容 */}.iframe-content {width: 100%; /* 宽度100% */height: 100%; /* 高度100% */border: none; /* 去除边框 */}.close-icon {width: 30px; /* 宽度30像素 */height: 30px; /* 高度30像素 */background-color: white; /* 背景颜色为白色 */border-radius: 50%; /* 设置圆角 */display: flex; /* 使用flex布局 */justify-content: center; /* 水平居中 */align-items: center; /* 垂直居中 */}.close-icon::after {content: "X"; /* 内容为X */}.button-open {padding: 10px 20px; /* 上下内边距10像素,左右内边距20像素 */border: none; /* 去除边框 */background-color: #0078d4; /* 背景颜色为蓝色 */color: white; /* 文字颜色为白色 */font-size: 16px; /* 字体大小为16像素 */border-radius: 5px; /* 设置圆角 */cursor: pointer; /* 鼠标指针为手型 */position: absolute; /* 设置定位为绝对定位 *//* 使用 flexbox 布局来使按钮居中 */top: 0; /* 距离顶部为0 */left: 0; /* 距离左侧为0 */right: 0; /* 距离右侧为0 */bottom: 0; /* 距离底部为0 */margin: auto; /* 居中 */width: 150px; /* 按钮的宽度为150像素 */height: 50px; /* 按钮的高度为50像素 */}</style>
</head><body><button onclick="openPopup()" class='button-open'>打开弹窗</button><div class="overlay" id="overlay" onclick="closePopup()"></div><div class="popup" id="popup"><button class="close-button" onclick="closePopup()"><div class="close-icon"></div></button><div class="iframe-container"><iframe class="iframe-content" id="popupContent" src="https://www.example.com" loading="lazy"sandbox="allow-same-origin allow-scripts" referrerPolicy="no-referrer"></iframe></div></div><script>function openPopup() {var overlay = document.getElementById("overlay");var popup = document.getElementById("popup");var popupContent = document.getElementById("popupContent");popupContent.src = "https://bing.com"; // 替换为您想要显示的弹窗内容的URLoverlay.style.display = "block"; // 显示遮罩层popup.style.display = "block"; // 显示弹窗}function closePopup() {var overlay = document.getElementById("overlay");var popup = document.getElementById("popup");overlay.style.display = "none"; // 隐藏遮罩层popup.style.display = "none"; // 隐藏弹窗}</script></body></html>
http://www.yayakq.cn/news/384300/

相关文章:

  • 大连网站建设设计公司哪家好东莞市聚势网络科技有限公司
  • 南宁营销型网站建设推广软文营销案例
  • 网站排名优化要多少钱广东哪家网站建
  • wordpress导出全站链接网站建网站建设网站站网站
  • 高校门户网站建设问题wordpress cms plugin
  • 服装图案素材网站上海 高端网站建设
  • 怎样设置个人网站无代码开发平台什么意思
  • 设计网站建设书南昌大学论文app程序开发的公司
  • wordpress 三款站群插件之比较网站导航自适应
  • 海安网站建设公司查不到网站备案
  • 一般找人做网站多少钱菏泽网站建设推广
  • 网站副标题怎么写室内设计师收入
  • 网站建设销售好做嘛微信营销软件手机版
  • 外贸官网建站自媒体135编辑器官网
  • 长春火车站到长春机场大巴时刻表心理教育网站建设目的
  • 湖北网站seo策划百度权重怎么查询
  • 怎么做网站文章优化网站流量分成
  • 运输 织梦网站模板中国建设网站培训通知
  • 政务网站信息化建设情况金融网站建设方法
  • 公司网站开发背景青岛东八区创意做网站
  • 计算机协会网站模板舆情分析报告
  • 网站建设收费标准案例医院网站建设的意义
  • 网站营销单页怎么做好看的网站色彩搭配
  • 南阳网站建设xihewh网站建设公司有前途吗
  • 海纳网站建设wordpress里面的附件如何导出
  • 微信h5制作网站开发发布网站后不可能存在的文件夹是
  • 摄影师个人网站模板公司网站在哪里做
  • 分析企业网站建设流程动画设计专业要艺考吗
  • 网站开发 开题报告唯品会购物商城
  • 做推广的网站带宽需要多少合适中国建设银行网站下载