CSS_解决IE6中min-width问题

解决 IE6 不支持 min-height 或 max-width 的方法 第一种方法是使用 JavaScript 来模拟这些属性的效果,通过获取元素的实际高度和宽度,并根据需要进行调整。在开发网页时,我们经常会遇到浏览器的兼容性问题。其中一个比较常见的问题是,旧版本的 Internet Explorer(特别是 IE6)不支持 CSS 的 min-height 和 max-width 属性。在上面的代码中,我们创建了一个容器 div,设置了初始的宽度和边框样式。在这个示例中,如果是 IE6,.container 元素的高度将被设置为 200px,宽度将被设置为 500px。 阅读详情

参考资料:http://www.webreference.com/programming/min-width/index.html

 

IE6中的min-width无效,而实际上,这是一个很好很有用的属性.

 

怎么解决呢?

 

参考资料中的方法其实也很麻烦,需要添加两个空div标签.

 

一个是设置一个大的边框宽度[ border-left: 300px solid #fff; ]

,再使用相对定位与浮动负值(等于边框宽度的值), [  margin-left: -300px;position: relative; ]

并且要使之拥有布局 [ height: 1px; ]

 

第二个方法差不多,不过是使用补白 [ padding-left: 300px; ]

 

代码如下:

 

【electron】- 从零到一:在electron-vite项目中集成better-sqlite3的工程化实践 本文详细介绍了在electron-vite项目中集成better-sqlite3数据库的完整工程化实践。针对原生模块的编译挑战,提供了从环境配置、路径规划、服务封装到IPC通信的解决方案,并重点解决了开发与生产环境的数据库路径分离及打包部署等核心问题,帮助开发者构建稳定高效的Electron桌面应用数据层。 阅读详情

相关推荐

MATLAB三元相图实战:从数据准备到高级可视化技巧全解析

本文深入解析了如何使用MATLAB绘制专业的三元相图(ternary plot)。文章从数据归一化、范围映射等预处理技巧入手,详细介绍了散点图、等高线图、凸包计算等高级可视化方法,并提供了多数据集对比与出版级图表美化的实战指南,帮助科研与工程人员高效呈现复杂的三元数据关系。

spark7igniter的博客 258

解决IE6不支持CSS中的min-width/height属性问题

    min-width与min-height在css中是相当好用的语法,可以让HTML元素最少仍保持一定的宽和高,而需要时仍随着元素的內容增加宽和高。    这么好的语法,偏偏IE 6不支持,不过说不支持也不准确,事实上IE6本身在指定height与width的值时,就具有min-width和min-height的特性,只是如果单纯用height或width来指定,到了Firefox或

Hello,World! 1442

西电微原课设——矩阵式键盘数字密码锁设计

内容要求:根据设定好的密码,采用4x4矩阵键盘实现密码的输入功能。当密码输入正确之后,锁就打开(绿灯亮),10秒之后,锁自动关闭(红灯亮);如果连续输入三次密码不正确,就锁定按键5秒钟,同时发出报警(黄灯闪),5秒后,解除按键锁定,恢复密码输入。...

Polaris的博客 1万+

[css] 如何让IE6支持min-width和max-width?

[css] 如何让IE6支持min-width和max-width? 利用IE特有的css语法 .className { max-width:620px; min-width:1px; _width:expression(this.scrollWidth > 620 ? "620px":(this.scrollWidth < 1? "1px":"auto")); } 个人简介 我是歌谣,欢迎和大家一起交流前后端知识。放弃很容易, 但坚持一定很酷。欢迎大家一起讨论 主目

歌谣的博客 423

SE (3) -Transformers:三维旋转 - 平移等变注意力网络

E (3) 变换器,这是一种用于三维点云和图的自注意力模块变体,在连续三维旋转平移下具有等变性。注意力机制的计算量会随着点云规模的增大呈二次方增长,因此引入邻域的概念是很有必要的:每个点不再关注所有其他点,而只关注其最近的邻点。注意力机制此前已在图的领域中以内部注意力、自注意力、顶点注意力或图注意力等名称被引入 [17, 31, 32, 12, 26]。等变性意味着当输入数据发生旋转或平移时,模型的输出也会以相应的、可预测的方式进行变换,从而保证模型性能的稳定性和可预测性。

qq_49786473的博客 1480

【5G全网建设】Option3X和Option2模式建安市、兴城市和四水市核心网、承载网网络设计与部署

拓扑规划: Option 3X网络拓扑图规划 Option 2网络拓扑图规划 设备部署: 建安市核心网 建安市承载中心机房 建安市骨干汇聚机房 建安市3区汇聚机房 建安市C站点无线机房 兴城市核心网 兴城市承载中心机房 兴城市骨干汇聚机房 兴城市2区汇聚机房 兴城市B站点无线机房 数据配置: 建安市核心网 建安市承载中心机房 建安市骨干汇聚机房 建安市3区汇聚机房 建安市C站点无线机房 兴城市核心网 兴城市承载中心机房 兴城市骨干汇聚机房 兴城市2区汇聚机房 兴城市B站点无线机房 业务调试

weixin_67183034的博客 8853

ie8 $(window).width() 值为0 问题

这周工作调试兼容性问题,好几年没弄这些了,重操旧业啊 遇到的第一个问题就是: ie8 弹框不居中,关键是有的居中,有的不居中。页面框架是基于jQuery UI,jQuery本身的dialog肯定没问题啊,要是有问题也不可能一部分显示正常了,而且我看了jQuery UI  的demo,ie8 妥妥的,没问题。 我们是这么用的,先封装了一个jyDialog,把内容创建之后,再调用jQuery

y_likeorg的博客 2504

【数据集3】高分辨率统计降尺度日值数据集NEX-GDDP的介绍与下载方法

对NEX-GDDP数据集进行介绍和下载说明

WW、forever的博客 2392

纯CSS实现IE6下min-height和min-width效果

min-height: CSS的兼容性问题一直令CSSer头疼,最小高度min-height是一个非常有用的属性,在页面布局中的很多地方可以用到。在52CSS.com的一些实例布局中也有涉及。   当容器的内容较少时,能保持一个最小的高度,以免破坏了布局或UI设计效果。而当容器内的内容增加的时候,容器能够自动的伸展以适应内容的变化。  声明:52CSS.com原创,转载...

ajo49838的博客 203

独家开源|RK3588 平台 YOLOv5 Android 源码级解析:NPU 量化、多线程与目标跟踪实战

本文将带你完成一个完整的AI视觉项目:在搭载RK3588芯片的Android开发板上运行实时目标检测与跟踪应用。实战目标:成功运行官方YOLOV5摄像头实时检测案例技术深度:深入理解RKNN开发框架和源码实现核心技能:掌握NPU推理、多线程并发、目标跟踪等关键技术。

m0_71589036的博客 193

Vue3 - 实现内网使用天地图离线地图,详解项目加载天地图的离线地图服务器部署与使用教程示例源码,vue3如何实现天地图的离线加载部署在内网访问(天地图资源下载/瓦片等流程教学,实现天地图各种功能)

Vue3中加载天地图的离线地图,天地图——内网使用离线地图,vue3+leaflet实现天地图离线访问,vue3项目中利用leaflet使用天地图,vue3项目中使用天地图离线地图,天地图离线瓦片的打包与发布(GeoServer)天地图离线瓦片数据下载及本地化部署,在内网中无法直接使用外网天地图资源怎么办,在vue3中openLayers加载地图 -使用天地图的瓦片数据。VUE3天地图离线怎么使用,内网部署天地图,天地图离线瓦片,部分瓦片数据,天地图如何离线,无需网络调用天地图API,vue天地图离线地图,

🏆 前端领域优质创作者 1万+

ie6下模拟min-width/height的新方法(No Hack)

min/max-width/height这几个属性在ie6里面并不支持。 但是,min-height这个属性的效果却是我们经常会用到的,是以使用的时候就需要在ie6下模拟出此效果。 一般使用的方法如下(使用hack): min-height:200px; _height:200px; 或 min-height:200px; width:auto !important; w...

dianzongfan5428的博客 170

【数据集】未来不同情景下预测数据:如人口、土地利用等

未来不同情景下预测数据:如人口、土地利用等

WW、forever的博客 2994

解决IE6不支持min-width和不支持max-width的方法。

1.IE6支持max-width解决方法 IE6支持最大宽度,解决CSS代码:.yangshi{ max-width:1000px; _width:expression((document.documentElement.clientWidth||document.body.clientWidth)<1000?"1000px":""); overflow:hidden; }说明: max-wid

zengyonglan的博客 971

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

兼容IE6 min-width 的CSS 样式

 IE6另外一个bug就是它不支持 min-width 属性. min-width又是相当有用的, 特别是对于弹性模板来说, 它们有一个100%的宽度,min-width 可以告诉浏览器何时就不要再压缩宽度了。  除IE6以外所有的浏览器你只需要一个 min-width: Xpx; 例如:  .container {   min-width:300px;   }  为了让他在IE6下工作, 我们需...

highflys的博客 155

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

Css min-width max-width 使用方法

CSS宽度属性为单词width,宽度width包含了两个重要的属性:最大宽度属性max-width和最小宽度属性min-width。最大宽度属性(max-width)用来定义宽度显示的最大值,当拖动浏览器边框使其显示范围大于最大宽度的时候,元素显示最大宽度值定义的宽度。在最大宽度属性值中,可以使用三种属性值,分别为auto值、长度值和百分比值;最小宽度属性(min-width)用来定义宽度显...

51yunOA 1404

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

解决IE6下min-width/max-width/min-height/max-height兼容性问题

在标准浏览器中直接使用min-width属性即可,而在IE6中需要通过expression表达式动态计算。原理是通过判断文档宽度是否小于设定值,如果是则强制设置为最小宽度,否则保持自动宽度。关键点在于使用scrollHeight属性来获取元素的实际内容高度,当内容高度小于设定最小值时,强制设置高度。实际应用中需要注意,这种表达式会在页面尺寸变化时不断执行,可能影响页面性能。这些兼容方案虽然有效,但expression存在性能问题,不适合在大型项目或高性能要求的场景中大量使用。

GarnetFalcon73的博客 568

php7 css样式不支持,div错位/解决IE6、IE7、IE8样式不兼容问题_html/css_WEB-ITnose

放到 标签下,然后为div指定一个类:然后CSS这样设计:#container{min-width: 600px;width:e­xpression(document.body.clientWidth < 600? “600px”: “auto” );}第一个min-width是正常的;但第2行的width使用了Javascript,这只有IE才认得,这也会让你的HTML文档不太正规。它实...

weixin_33721696的博客 231

学习总结--Css中最小宽度min-width和最大宽度max-width属性的使用方法

CSS宽度属性为单词width,宽度width包含了两个重要的属性:最大宽度属性max-width和最小宽度属性min-width。最大宽度属性(max-width)用来定义宽度显示的最大值,当拖动浏览器边框使其显示范围大于最大宽度的时候,元素显示最大宽度值定义的宽度。在最大宽度属性值中,可以使用三种属性值,分别为auto值、长度值和百分比值;最小宽度属性(min-width)用来定义宽度显示的最

陈年华的博客 8319

min-height,min-width等兼容IE6

min-width max-width这两个属性在ie6中是不支持的。这里介绍一些兼容解决方法。使用expression属性(CSS表达式这个方法会让浏览器的访问速度变慢,尽量少用)最小宽度500px:.min { width: expression(document.body.clientWidth < 500? "500px" : "auto"); }最大宽度50...

weixin_34192816的博客 81

解决ie6在css上的兼容问题

ie6上css碰到的坑 前两天在给一个项目做东西的时候,碰到一个有意思的项目,是需要兼容ie6,有一些碰到并且解决的问题,给大家写下来,方便大家以后碰到类似的问题哈~ 1.important支持的不够好 1.1为什么说不够好? important某些情况下不能决定最终的样式属性。 1.2代码!代码!! 我们通过对颜色的控制说明这一切~ <style type="text/css"> ...

qq_35436516的博客 483

how to make IE6 use min-height/max-width

这么好的语法,偏偏IE 6不支持,不过说不支持也不准确,事实上IE6本身在指定height与width的值时,就具有min-width和min-height的特性,只是如果单纯用height或width来指定,到 了Firefox或IE 7时,又会把它当作是锁死的值,不会因內容增加而扩大元素的box。解决的方法先看语法。最小高度的解決 .mh{ min-height:100px; hei...

抽刀断水 86

ie6 css expression 实现min-width/max-width

1.实现最小宽度min-width标准浏览器和ie7+用:min-width:1008px;这样在实现自适应布局时可以保证布局不小于一定宽度,同时宽屏或窄屏窗口被用户拖窄后不会出现布局自动换行。对于Ie6以下模拟实现用的css表达式:_width:expression((documentElement.clientWidth < 1008) ? "1008px" : "auto" );2.最大宽度max-width标准浏览器和ie7+用:max-width:600px;实际中可以对布局元素如divOut{w

230

IE6支持min-width、max-width CSS样式属性

1、IE6支持max-width解决方法 IE6支持最大宽度,解决CSS代码: .yangshi{   max-width:1000px;   _width:expression((document.documentElement.clientWidth||document.body.clientWidth)<1000?"1000px":"");   overflow:hidden...

weixin_30787531的博客 85
上一篇: JS_拖动_一个封装好的拖动层效果
下一篇: CSS_td标签中的colspan
trace332
博客等级 码龄19年 34粉丝 123原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值