You can try...

//css

.gritter-center{
position:fixed;
left:33%;
right:33%;
top:33%
}

//Javascript

$.gritter.add({
title: 'This is a centered notification',
text: 'Just add a "gritter-center" class_name to your $.gritter.add or globally to $.gritter.options.class_name',
class_name: 'gritter-info gritter-center'
});

ref: https://stackoverflow.com/questions/18461530/jquery-gritter-set-position

Jquery Gritter set position的更多相关文章

  1. jquery 获取css position的值

      jquery 获取css position的值 CreateTime--2018年5月28日14:03:12 Author:Marydon 1.情景展示 <div id="aa&q ...

  2. jquery.gritter 提示

    首先引入css和js文件 <link rel="stylesheet" href="<%=basePath%>assets/css/jquery.gri ...

  3. jQuery offset,position,offsetParent,scrollLeft,scrollTop html控件定位 css position

    定位应用:点击一个按钮,然后在按钮的右边弹出一个提示框 1,提示框相对于屏幕进行定位,那么使用offset来取得当前按钮相对于body的top和left,然后通过$('body').prepend(t ...

  4. jquery offset() 与position()方法的区别

    jquery 中有两个获取元素位置的方法offset()和position(),这两个方法之间有什么异同?使用的时候应该注意哪些问题?什么时候使用offset(),什么时候又使用position()呢 ...

  5. jquery.gritter.js简介

    Gritter 是一个小型的 jQuery 消息通知插件,通知效果如下图所示: 参考网

  6. jquery offset()和position()的区别

    <script src="jquery/jquery-3.3.1.min.js"></script> <script type="text/ ...

  7. 用jquery写的position瀑布流布局

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  8. js中的offsetParent,offsetLeft,offsetTop及jquery的offset(),position()比较

    1.offsetParent 元素的offsetParent并不是元素的父元素,判断元素的offsetParent要根据以下情况: 1)当DOM结构层次中的元素均没有进行css定位(设置positio ...

  9. jQuery之offset,position

    获取/设置标签的位置数据 * offset(): 相对页面左上角的坐标 * position(): 相对于父元素左上角的坐标. 需求: 1. 点击 btn1 打印 div1 相对于页面左上角的位置 打 ...

随机推荐

  1. LeetCode: Largest Rectangle in Histogram 解题报告

    Largest Rectangle in Histogram Given n non-negative integers representing the histogram's bar height ...

  2. 【密码学】RSA公钥密码体制

    RSA公钥密码体制是美国麻省理工学院(MIT)的三位科学家Rivest.Shamir.Adleman于1978年提出的,简称RSA公钥秘密系统.实际上,RSA稍后于MH背包公钥密码实用系统,但它的影响 ...

  3. script 页面在指定位置加载

    <head> <script>  function load(){window.location="#workspaces"} </script> ...

  4. 基于css3 transform实现散乱的照片排列

    分享一款基于css3 transform实现散乱的照片排列.这是一款简单零散的css3相册排列特效下载.效果图如下: 在线预览   源码下载 实现的代码. html代码: <div class= ...

  5. 解决hibernate向mysql插入中文乱码问题(转)

    转载自:http://blog.csdn.net/peditable/article/details/7047573 1.首先需要修改MySQL数据库的配置文件my.ini,此文件放在mysql根目录 ...

  6. Oracle 重启数据库实例

    看你当前有多少个已经启动的实例: ps -ef|grep smon ORA-27101 Shared memory realm does not existORA-01034 ORACLE not a ...

  7. Spring boot 报错 Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

    在实际开发中修改别人的代码,发现了这个报错,后来发现是因为pom.xml里面 只要将注释掉的部分注释掉就好了.

  8. swift.org - About Swift 官网关于notes

    About Swifthtml, body {overflow-x: initial !important;}html { font-size: 14px; } body { margin: 0px; ...

  9. 【转】使用scipy进行层次聚类和k-means聚类

    scipy cluster库简介 scipy.cluster是scipy下的一个做聚类的package, 共包含了两类聚类方法: 1. 矢量量化(scipy.cluster.vq):支持vector ...

  10. 腾讯云安装Hadoop遇到的问题

    1.能正常访问bincoding.cn:50030,不能连接到9000端口 Call to bincoding.cn/123.206.212.115:9000 failed on connection ...