简易透明黑色背景

1.样式

.cover{
    height: 100%; width: 100%; position: fixed; bottom: 0px; left: 0px; top: 0px; z-index: 9998; background-color: rgb(0, 0, 0);

filter:alpha(opacity=50);

-moz-opacity:0.5;

-khtml-opacity: 0.5;

opacity: 0.5;
}

2.js

$(‘.cover‘).show();

$(‘.cover‘).hide();

时间: 2024-08-04 05:08:13

简易透明黑色背景的相关文章

iOS:提示框(警告框)控件UIActionSheet的详解

提示框(警告框)控件2:UIActionSheet 功能:当点击按钮或标签等时,弹出一个提示框,显示必要的提示,然后通过添加的按钮完成需要的功能.它与导航栏类似,它继承自UIView. 风格类型: typedef NS_ENUM(NSInteger, UIActionSheetStyle) { UIActionSheetStyleAutomatic        = -1,       //iOS系统自动默认的风格 UIActionSheetStyleDefault          = UIB

【学习ios之路:UI系列】UIAlertView. UIActionSheet 和 UIAlertController

1.UIAlertView ①简单无代理模式,代码如下: UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"提示" message:@"这是一个警告" delegate:nil cancelButtonTitle:@"取消" otherButtonTitles:@"确定",  @"按钮一", @"按钮二", nil

iOS学习笔记——iOS高级控件

UITableView UITableView的样式有两种,一种是Grouped(左图),另一种是Plain(右图),如下图,它的属性是style,类型为UITableViewStyle,枚举值分别是UITableViewStyleGrouped和UITableViewStylePlain: 用这个控件的ViewController可以使用UITableViewController,使用了这个ViewController可以不需要另外创建UITableView,里面也包含了UITableView

iOS基础-系统自带按钮样式- UIBarButtonSystemItem

系统按钮 除了图像与文字按钮,还有一个小型的系统按钮库,可以创建那些在许多应用程序中都可以见到的标准化的预定义按钮.系统按钮也是UIBarButtonItem对象,可以通过类的initWithBarButtonSystemItem方法来创建.如下例: UIBarButtonItem *myBookmarks = [ [ UIBarButtonItem alloc ] initWithBarButtonSystemItem: UIBarButtonSystemItemBookmarks targe

iOS: 工具栏控件UIToolBar和工具栏按钮控件UIBarButtonItem的使用

一.工具栏控件:UIToolBar:UIView 介绍: ToolBar工具栏是视图View的属性,可以在工具栏上添加工具栏按钮Bar Button Item(可以是自定义的Custom.也可以是系统自带的BarButtonSystemItem ),视图控制器可以通过工具栏项对视图中内容进行操作. 注意事项: 在导航栏控制器中会有一个UIToolBar实例,但默认是隐藏的,如果需要显示,需要通过这个方法将其打开: 在这里需要注意的是,与UINavigationBar类似,导航控制器拥有且只拥有一

UIActionSheet的常用方法

enum UIActionSheetStyle : Int { case Automatic // take appearance from toolbar style otherwise uses 'default' case Default //默认风格:灰色背景上显示白色文字   case BlackTranslucent ////透明黑色背景,白色文字 case BlackOpaque // //纯黑背景,白色文字   } //初始化,标题,代理,取消按钮,销毁按钮init(title:

iOS UI基础-6.0 UIActionSheet的使用

UIActionSheet是在iOS弹出的选择按钮项,可以添加多项,并为每项添加点击事件. 使用 1.需要实现UIActionSheetDelegate  协议 @interface NJWisdomCardDetailViewController ()<UIActionSheetDelegate> @end 2.弹出选择按钮框 - (void)showSheet{ UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitl

【IOS】UIActionSheet的使用

UIActionSheet是在iOS弹出的选择按钮项,可以添加多项,并为每项添加点击事件. 为了快速完成这例子,我们打开Xcode , 先建立一个single view application.然后再xib文件添加一个button,用来弹出sheet view. 1.首先在.h文件中实现协议 加代码的地方在@interface那行的最后添加<UIActionSheetDelegate>,协议相当于java里的接口,实现协议里的方法. @interface sheetviewViewContro

iOS 搜索框之UISearchBar

一.初始化:UISearchBar继承于UIView,我们可以像创建View那样创建searchBar UISearchBar * bar = [[UISearchBar alloc]initWithFrame:CGRectMake(20, 100, 250, 40)]; [self.view addSubview:bar]; 二.属性 @property(nonatomic)        UIBarStyle              barStyle; 这个属性可以设置searchBar的